make Text Model translatable

This commit is contained in:
Olivier Legat 2022-01-23 12:38:29 +01:00
parent 0839d40242
commit 4a75a9f388

View file

@ -3,14 +3,14 @@
namespace App\Models;
use App\Enums\Page;
use App\Traits\CastsEnumsHasTranslations;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
use Kwaadpepper\Enum\Traits\CastsEnums;
class Text extends Model
{
use HasFactory;
use CastsEnums;
use CastsEnumsHasTranslations;
public $enumCasts = [
'page' => Page::class
@ -20,4 +20,9 @@ class Text extends Model
'title',
'text',
];
public $translatable = [
'title',
'text',
];
}