Page::class ]; /** * Engagment fillable fields * * @var array */ #[\Override] protected $fillable = [ 'title', 'description', 'keywords' ]; /** * Engagment translatable fields array * * @var array */ public $translatable = [ 'title', 'description', 'keywords' ]; /** * Get the route key for the model. * * @return string */ public function getRouteKeyName() { return 'page'; } /** * Get Generic attribute value * * @param mixed $key * @return mixed */ public function getAttributeValue($key) { if ($this->hasEnumCast($key)) { $value = parent::getAttributeValue($key); return $this->castToEnum($key, $value); } return $this->TransGetAttributeValue($key); } /** * Set a given attribute on the model. * * @param mixed $key * @param mixed $value * @return mixed */ public function setAttribute($key, $value) { if ($this->hasEnumCast($key)) { return $this->EnumSetAttribute($key, $value); } return $this->TransSetAttribute($key, $value); } }