phase 6
This commit is contained in:
@@ -0,0 +1,13 @@
|
||||
<?php
|
||||
namespace Modules\Localization\Models;
|
||||
use App\Models\User;
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
||||
use Illuminate\Database\Eloquent\Relations\MorphTo;
|
||||
final class LocalizedContent extends Model
|
||||
{
|
||||
protected $fillable = ['locale_id','field','value','updated_by'];
|
||||
public function translatable(): MorphTo { return $this->morphTo(); }
|
||||
public function locale(): BelongsTo { return $this->belongsTo(Locale::class); }
|
||||
public function editor(): BelongsTo { return $this->belongsTo(User::class, 'updated_by'); }
|
||||
}
|
||||
Reference in New Issue
Block a user