25 lines
444 B
PHP
25 lines
444 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use App\Enums\NotifStyle;
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class UserSetting extends Model
|
|
{
|
|
protected $guarded = ['id'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return [
|
|
'notif_style' => NotifStyle::class,
|
|
];
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|