22 خطوط
483 B
PHP
22 خطوط
483 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class NotificationPreference extends Model
|
|
{
|
|
protected $fillable = ['user_id', 'notification_type', 'in_app_enabled', 'is_muted'];
|
|
|
|
protected function casts(): array
|
|
{
|
|
return ['in_app_enabled' => 'boolean', 'is_muted' => 'boolean'];
|
|
}
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|