28 lines
462 B
PHP
28 lines
462 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
use Illuminate\Database\Eloquent\Relations\BelongsTo;
|
|
|
|
class Notification extends Model
|
|
{
|
|
const UPDATED_AT = null;
|
|
|
|
protected $fillable = [
|
|
'user_id',
|
|
'type',
|
|
'message',
|
|
'is_read',
|
|
];
|
|
|
|
protected $casts = [
|
|
'is_read' => 'boolean',
|
|
];
|
|
|
|
public function user(): BelongsTo
|
|
{
|
|
return $this->belongsTo(User::class);
|
|
}
|
|
}
|