'array', 'is_featured' => 'boolean', ]; protected static function booted(): void { static::saving(function (Project $project) { if (blank($project->slug)) { $project->slug = Str::slug($project->title); } }); } public function getRouteKeyName(): string { return 'slug'; } protected function imageUrl(): Attribute { return Attribute::get(fn () => $this->image ? Storage::disk('public')->url($this->image) : null); } }