Update carshowcategory filament resource

This commit is contained in:
Russ Long 2022-08-06 15:46:22 -04:00
parent f54e41aef9
commit 003e686224
4 changed files with 43 additions and 4 deletions

View File

@ -38,17 +38,25 @@ class CarShowCategoryResource extends Resource
]) ])
->actions([ ->actions([
Tables\Actions\EditAction::make(), Tables\Actions\EditAction::make(),
Tables\Actions\DeleteAction::make(),
]) ])
->bulkActions([ ->bulkActions([
Tables\Actions\DeleteBulkAction::make(), Tables\Actions\DeleteBulkAction::make(),
]); ]);
} }
public static function getRelations(): array
{
return [
//
];
}
public static function getPages(): array public static function getPages(): array
{ {
return [ return [
'index' => Pages\ManageCarShowCategories::route('/'), 'index' => Pages\ListCarShowCategories::route('/'),
'create' => Pages\CreateCarShowCategory::route('/create'),
'edit' => Pages\EditCarShowCategory::route('/{record}/edit'),
]; ];
} }
} }

View File

@ -0,0 +1,12 @@
<?php
namespace App\Filament\Resources\CarShowCategoryResource\Pages;
use App\Filament\Resources\CarShowCategoryResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\CreateRecord;
class CreateCarShowCategory extends CreateRecord
{
protected static string $resource = CarShowCategoryResource::class;
}

View File

@ -0,0 +1,19 @@
<?php
namespace App\Filament\Resources\CarShowCategoryResource\Pages;
use App\Filament\Resources\CarShowCategoryResource;
use Filament\Pages\Actions;
use Filament\Resources\Pages\EditRecord;
class EditCarShowCategory extends EditRecord
{
protected static string $resource = CarShowCategoryResource::class;
protected function getActions(): array
{
return [
Actions\DeleteAction::make(),
];
}
}

View File

@ -4,9 +4,9 @@ namespace App\Filament\Resources\CarShowCategoryResource\Pages;
use App\Filament\Resources\CarShowCategoryResource; use App\Filament\Resources\CarShowCategoryResource;
use Filament\Pages\Actions; use Filament\Pages\Actions;
use Filament\Resources\Pages\ManageRecords; use Filament\Resources\Pages\ListRecords;
class ManageCarShowCategories extends ManageRecords class ListCarShowCategories extends ListRecords
{ {
protected static string $resource = CarShowCategoryResource::class; protected static string $resource = CarShowCategoryResource::class;