protected function setTitleAttribute($title) { $this->attributes['title'] = $title; $this->slug = Str::slug($title); }