From 5cd77faf793c67d4c8f1d82b6ae4abc1af64a7ec Mon Sep 17 00:00:00 2001 From: Russ Long Date: Sat, 6 Aug 2022 16:24:05 -0400 Subject: [PATCH] category edit --- app/Filament/Resources/CarShowCategoryResource.php | 2 +- app/Models/CarShowCategory.php | 4 ++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/Filament/Resources/CarShowCategoryResource.php b/app/Filament/Resources/CarShowCategoryResource.php index 1f0788c..c0c11c9 100644 --- a/app/Filament/Resources/CarShowCategoryResource.php +++ b/app/Filament/Resources/CarShowCategoryResource.php @@ -29,7 +29,7 @@ class CarShowCategoryResource extends Resource return $form ->schema([ TextInput::make('category_name'), - Toggle::make('vehicle_category'), + Toggle::make('vehicle_category')->inline(false), ]); } diff --git a/app/Models/CarShowCategory.php b/app/Models/CarShowCategory.php index b562084..8993e7b 100644 --- a/app/Models/CarShowCategory.php +++ b/app/Models/CarShowCategory.php @@ -9,6 +9,10 @@ class CarShowCategory extends Model protected $table = 'car_show_categories'; protected static ?string $recordTitleAttribute = 'category_name'; + protected $casts = [ + 'vehicle_type' => 'boolean', + ]; + protected $fillable = [ 'category_name', 'vehicle_type'