أُنشئ من Tokal/Test
32 أسطر
542 B
PHP
32 أسطر
542 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
|
|
|
class Notification extends Model
|
|
{
|
|
use HasFactory;
|
|
public $timestamps = false;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'type',
|
|
'title',
|
|
'body',
|
|
'data_json',
|
|
'is_read',
|
|
];
|
|
|
|
protected $casts = [
|
|
'data_json' => 'array',
|
|
'is_read' => 'boolean',
|
|
];
|
|
|
|
public function user()
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|