*/ use HasFactory; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ 'name', 'slug', 'description', 'website_url', 'active', ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ 'active' => 'boolean', ]; } public function products(): HasMany { return $this->hasMany(Product::class); } }