*/ protected $dispatchesEvents = [ 'created' => PageCreated::class, 'deleted' => PageDeleted::class, 'restored' => PageRestored::class, 'updated' => PageUpdated::class, ]; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ Page::ATTRIBUTE_BODY, Page::ATTRIBUTE_NAME, Page::ATTRIBUTE_SLUG, ]; /** * The attributes that should be hidden for serialization. * * @var list */ protected $hidden = [ Page::ATTRIBUTE_BODY, ]; /** * Get the route key for the model. * * @noinspection PhpMissingParentCallCommonInspection */ public function getRouteKeyName(): string { return Page::ATTRIBUTE_SLUG; } public function getName(): string { return $this->name; } public function getSubtitle(): string { return $this->slug; } }