From d7f3886bbde6eeea776b3d5070d82a4c30499777 Mon Sep 17 00:00:00 2001 From: TCHOUKOUAHA Boris Gautier Date: Wed, 20 Mar 2024 14:35:22 +0100 Subject: [PATCH] =?UTF-8?q?Mise=20=C3=A0=20jour=20de=20la=20ressource=20Ca?= =?UTF-8?q?tegorieOddResource?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Resources/CategorieOddResource.php | 26 +++++++++---------- 1 file changed, 12 insertions(+), 14 deletions(-) diff --git a/app/Filament/Resources/CategorieOddResource.php b/app/Filament/Resources/CategorieOddResource.php index 0e07755..194a33c 100644 --- a/app/Filament/Resources/CategorieOddResource.php +++ b/app/Filament/Resources/CategorieOddResource.php @@ -19,23 +19,21 @@ class CategorieOddResource extends Resource protected static ?string $navigationIcon = 'heroicon-o-rectangle-stack'; - protected static ?string $navigationLabel = 'Cibles des Objectifs'; + protected static ?string $navigationLabel = 'Cibles des Objectifs'; - protected static ?string $navigationGroup = 'Objectifs'; + protected static ?string $navigationGroup = 'Objectifs'; public static function form(Form $form): Form { return $form ->schema([ - Forms\Components\TextInput::make('category_number') + Forms\Components\TextInput::make('category_number') ->required() ->maxLength(255), Forms\Components\TextInput::make('intitule') - ->required() - ->maxLength(255), + ->required(), Forms\Components\TextInput::make('name_en') - ->required() - ->maxLength(255), + ->required(), Forms\Components\Select::make('id_odd') ->relationship('odd', 'name') ->required(), @@ -86,14 +84,14 @@ public static function table(Table $table): Table Tables\Actions\CreateAction::make(), ]); } - + public static function getRelations(): array { return [ // ]; } - + public static function getPages(): array { return [ @@ -102,8 +100,8 @@ public static function getPages(): array 'view' => Pages\ViewCategorieOdd::route('/{record}'), 'edit' => Pages\EditCategorieOdd::route('/{record}/edit'), ]; - } - + } + public static function getEloquentQuery(): Builder { return parent::getEloquentQuery() @@ -118,7 +116,7 @@ public static function shouldRegisterNavigation(): bool } public static function getNavigationBadge(): ?string -{ - return static::getModel()::count(); -} + { + return static::getModel()::count(); + } }