*/ protected $fillable = [ Announcement::ATTRIBUTE_CONTENT, ]; /** * The event map for the model. * * Allows for object-based events for native Eloquent events. * * @var array */ protected $dispatchesEvents = [ 'created' => AnnouncementCreated::class, 'deleted' => AnnouncementDeleted::class, 'restored' => AnnouncementRestored::class, 'updated' => AnnouncementUpdated::class, ]; /** * The table associated with the model. * * @var string */ protected $table = Announcement::TABLE; /** * The primary key associated with the table. * * @var string */ protected $primaryKey = Announcement::ATTRIBUTE_ID; /** * Get name. * * @return string */ public function getName(): string { return strval($this->getKey()); } /** * Get subtitle. * * @return string */ public function getSubtitle(): string { return $this->getName(); } }