*/ protected $dispatchesEvents = [ 'created' => FeatureCreated::class, 'deleted' => FeatureDeleted::class, 'updated' => FeatureUpdated::class, ]; /** * The attributes that are mass assignable. * * @var list */ protected $fillable = [ Feature::ATTRIBUTE_VALUE, ]; /** * Get the attributes that should be cast. * * @return array */ protected function casts(): array { return [ Feature::ATTRIBUTE_NAME => 'string', Feature::ATTRIBUTE_SCOPE => 'string', ]; } public function getName(): string { return $this->name; } public function getSubtitle(): string { return $this->scope; } /** * Determine if the feature scope is global. */ public function isNullScope(): bool { return $this->scope === FeatureConstants::NULL_SCOPE; } }