ldc-legaulois/app/Models/Notifications.php
2022-02-10 16:14:58 +01:00

27 lines
458 B
PHP

<?php
namespace App\Models;
use App\Enums\NotificationType;
use Illuminate\Database\Eloquent\Model;
class Notifications extends Model
{
protected $enumCasts = [
'type' => NotificationType::class
];
protected $fillable = [
'type',
'content',
'customer_id'
];
/**
* Polymorphic relation : Get the parent model
*/
public function notifiable()
{
return $this->morphTo();
}
}