ldc-legaulois/app/Models/Notifications.php

29 lines
459 B
PHP
Raw Normal View History

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