*/ protected $fillable = [ 'name', 'slug', 'description', 'price', 'is_active', ]; /** * Translatable fields * * @var array */ public $translatable = [ 'name', 'description', ]; /** * The attributes that should be cast. * * @var array */ protected $casts = [ 'is_active' => 'boolean', ]; /** * Get the options for generating the slug. */ public function getSlugOptions(): SlugOptions { return SlugOptions::create() ->generateSlugsFrom('name') ->saveSlugsTo('slug'); } }