ldc-doux/app/Models/Text.php

45 lines
752 B
PHP
Raw Permalink Normal View History

2021-12-15 10:09:39 +01:00
<?php
namespace App\Models;
use App\Enums\Page;
use App\Traits\CastsEnumsHasTranslations;
2021-12-15 10:09:39 +01:00
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Text extends Model
{
use HasFactory;
use CastsEnumsHasTranslations;
2021-12-15 10:09:39 +01:00
2022-08-29 17:23:10 +02:00
/**
* Map attribute names to enum classes.
*
* @var array
*/
2021-12-15 10:09:39 +01:00
public $enumCasts = [
'page' => Page::class
];
2022-08-29 17:23:10 +02:00
/**
* The attributes that are mass assignable.
*
* @var array
*/
2026-10-27 09:12:51 +01:00
#[\Override]
2021-12-15 10:09:39 +01:00
protected $fillable = [
'title',
'text',
];
2022-01-23 12:38:29 +01:00
2022-08-29 17:23:10 +02:00
/**
* The attributes that are translatable.
*
* @var array
*/
2022-01-23 12:38:29 +01:00
public $translatable = [
'title',
'text',
];
2021-12-15 10:09:39 +01:00
}