diff --git a/app/Filament/Resources/ContactFormResource.php b/app/Filament/Resources/ContactFormResource.php index f9ee4758..245bd3d8 100644 --- a/app/Filament/Resources/ContactFormResource.php +++ b/app/Filament/Resources/ContactFormResource.php @@ -23,12 +23,6 @@ class ContactFormResource extends Resource { - protected static ?string $model = ContactForm::class; - protected static ?string $label = "wiadomość"; - protected static ?string $pluralLabel = "Wiadomości"; - protected static ?string $navigationIcon = "heroicon-o-envelope-open"; - protected static bool $hasTitleCaseModelLabel = false; - public static function form(Form $form): Form { return $form @@ -134,4 +128,10 @@ public static function canCreate(): bool { return false; } + + protected static ?string $model = ContactForm::class; + protected static ?string $label = "wiadomość"; + protected static ?string $pluralLabel = "Wiadomości"; + protected static ?string $navigationIcon = "heroicon-o-envelope-open"; + protected static bool $hasTitleCaseModelLabel = false; } diff --git a/app/Filament/Resources/NewsResource.php b/app/Filament/Resources/NewsResource.php index 667f69dc..2f2fc73c 100644 --- a/app/Filament/Resources/NewsResource.php +++ b/app/Filament/Resources/NewsResource.php @@ -29,12 +29,6 @@ class NewsResource extends Resource { use Translatable; - protected static ?string $model = News::class; - protected static ?string $label = "aktualność"; - protected static ?string $pluralLabel = "Aktualności"; - protected static ?string $navigationIcon = "heroicon-o-rectangle-stack"; - protected static bool $hasTitleCaseModelLabel = false; - public static function form(Form $form): Form { return $form @@ -161,4 +155,10 @@ public static function getTranslatableLocales(): array { return config("app.translatable_locales"); } + + protected static ?string $model = News::class; + protected static ?string $label = "aktualność"; + protected static ?string $pluralLabel = "Aktualności"; + protected static ?string $navigationIcon = "heroicon-o-rectangle-stack"; + protected static bool $hasTitleCaseModelLabel = false; } diff --git a/app/Filament/Resources/ProjectResource.php b/app/Filament/Resources/ProjectResource.php index 008a6592..a52063d8 100644 --- a/app/Filament/Resources/ProjectResource.php +++ b/app/Filament/Resources/ProjectResource.php @@ -18,12 +18,6 @@ class ProjectResource extends Resource { - protected static ?string $model = Project::class; - protected static ?string $label = "projekt"; - protected static ?string $pluralLabel = "Projekty"; - protected static ?string $navigationIcon = "heroicon-o-swatch"; - protected static bool $hasTitleCaseModelLabel = false; - public static function form(Form $form): Form { return $form @@ -120,6 +114,12 @@ public static function getPages(): array ]; } + protected static ?string $model = Project::class; + protected static ?string $label = "projekt"; + protected static ?string $pluralLabel = "Projekty"; + protected static ?string $navigationIcon = "heroicon-o-swatch"; + protected static bool $hasTitleCaseModelLabel = false; + protected static function getTemplateOptions(): array { $files = scandir(resource_path("views/projects")); diff --git a/app/Filament/Resources/ReferenceResource.php b/app/Filament/Resources/ReferenceResource.php index 5f6d81d6..a1e45ba5 100644 --- a/app/Filament/Resources/ReferenceResource.php +++ b/app/Filament/Resources/ReferenceResource.php @@ -18,12 +18,6 @@ class ReferenceResource extends Resource { - protected static ?string $model = Reference::class; - protected static ?string $label = "referencję"; - protected static ?string $pluralLabel = "Referencje"; - protected static ?string $navigationIcon = "heroicon-o-hand-thumb-up"; - protected static bool $hasTitleCaseModelLabel = false; - public static function form(Form $form): Form { return $form @@ -113,4 +107,10 @@ public static function getPages(): array "edit" => Pages\EditReferences::route("/{record}/edit"), ]; } + + protected static ?string $model = Reference::class; + protected static ?string $label = "referencję"; + protected static ?string $pluralLabel = "Referencje"; + protected static ?string $navigationIcon = "heroicon-o-hand-thumb-up"; + protected static bool $hasTitleCaseModelLabel = false; } diff --git a/app/Filament/Resources/TagResource.php b/app/Filament/Resources/TagResource.php index bebb43a5..6ae8785b 100644 --- a/app/Filament/Resources/TagResource.php +++ b/app/Filament/Resources/TagResource.php @@ -16,11 +16,6 @@ class TagResource extends Resource { - protected static ?string $model = Tag::class; - protected static ?string $label = "tag"; - protected static ?string $pluralLabel = "Tagi"; - protected static ?string $navigationIcon = "heroicon-o-rectangle-stack"; - public static function form(Form $form): Form { return $form @@ -72,4 +67,9 @@ public static function getPages(): array "edit" => Pages\EditTag::route("/{record}/edit"), ]; } + + protected static ?string $model = Tag::class; + protected static ?string $label = "tag"; + protected static ?string $pluralLabel = "Tagi"; + protected static ?string $navigationIcon = "heroicon-o-rectangle-stack"; } diff --git a/app/Filament/Resources/UserResource.php b/app/Filament/Resources/UserResource.php index 1088b34a..038dc456 100644 --- a/app/Filament/Resources/UserResource.php +++ b/app/Filament/Resources/UserResource.php @@ -19,12 +19,6 @@ class UserResource extends Resource { - protected static ?string $model = User::class; - protected static ?string $label = "użytkownika"; - protected static ?string $pluralLabel = "Użytkownicy"; - protected static ?string $navigationIcon = "heroicon-o-user-group"; - protected static bool $hasTitleCaseModelLabel = false; - public static function form(Form $form): Form { /** @var User $authUser */ @@ -118,4 +112,10 @@ public static function canDelete(Model $record): bool return $user->isAdmin() && $record->id !== $user->id; } + + protected static ?string $model = User::class; + protected static ?string $label = "użytkownika"; + protected static ?string $pluralLabel = "Użytkownicy"; + protected static ?string $navigationIcon = "heroicon-o-user-group"; + protected static bool $hasTitleCaseModelLabel = false; } diff --git a/app/Models/News.php b/app/Models/News.php index 1d3b8853..3d22d82c 100644 --- a/app/Models/News.php +++ b/app/Models/News.php @@ -50,14 +50,14 @@ class News extends Model "tags" => "array", ]; - public function getRelatedTagModels(): Collection - { - return Tag::query()->whereIn("id", $this->tags)->get(); - } - public static function boot(): void { parent::boot(); static::observe(NewsObserver::class); } + + public function getRelatedTagModels(): Collection + { + return Tag::query()->whereIn("id", $this->tags)->get(); + } } diff --git a/config/mail.php b/config/mail.php index 378fb5d0..30c47a66 100644 --- a/config/mail.php +++ b/config/mail.php @@ -15,7 +15,7 @@ "password" => env("MAIL_PASSWORD"), "timeout" => null, "local_domain" => env("MAIL_EHLO_DOMAIN"), - 'scheme' => env('MAIL_SCHEME', 'smtp'), + "scheme" => env("MAIL_SCHEME", "smtp"), ], "log" => [ "transport" => "log",