30 lines
631 B
PHP
30 lines
631 B
PHP
<?php
|
|
|
|
namespace App\Domain\Administration\Models;
|
|
|
|
use App\Models\User;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class PortalSetting extends Model
|
|
{
|
|
public $incrementing = false;
|
|
|
|
protected $primaryKey = 'key';
|
|
|
|
protected $keyType = 'string';
|
|
|
|
protected $fillable = ['key', 'value', 'description', 'updated_by'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['value' => 'json'];
|
|
}
|
|
|
|
/** @return BelongsTo<User, $this> */
|
|
public function updatedBy(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class, 'updated_by');
|
|
}
|
|
}
|