أُنشئ من Tokal/Test
Initial backend upload
هذا الالتزام موجود في:
30
app/Models/Notification.php
Normal file
30
app/Models/Notification.php
Normal file
@@ -0,0 +1,30 @@
|
||||
<?php
|
||||
|
||||
namespace App\Models;
|
||||
|
||||
use Illuminate\Database\Eloquent\Model;
|
||||
use Illuminate\Database\Eloquent\Factories\HasFactory;
|
||||
|
||||
class Notification extends Model
|
||||
{
|
||||
use HasFactory;
|
||||
|
||||
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);
|
||||
}
|
||||
}
|
||||
المرجع في مشكلة جديدة
حظر مستخدم