D7net
Home
Console
Upload
information
Create File
Create Folder
About
Tools
:
/
home
/
forge
/
kader-lms.com
/
Modules
/
Chat
/
Entities
/
Filename :
Notification.php
back
Copy
<?php namespace Modules\Chat\Entities; use App\Models\User; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Factories\HasFactory; class Notification extends Model { use HasFactory; protected $table = 'notifications'; protected $fillable = [ 'type', 'notifiable_type', 'notifiable_id', 'data', 'read_at', ]; protected $casts = [ 'data' => 'array', ]; protected static function newFactory() { return \Modules\Chat\Database\factories\NotificationFactory::new(); } public function getDataAttribute($value) { return json_decode($value); } }