Aplikasi_Rekber/app/Models/Notification.php
2023-11-27 09:06:28 +07:00

28 lines
489 B
PHP

<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Factories\HasFactory;
use Illuminate\Database\Eloquent\Model;
class Notification extends Model
{
use HasFactory;
protected $fillable = [
'title',
'teaser',
'content',
];
protected $casts = [
'id' => 'string',
];
// Relasi
public function notifications(){
return $this->hasMany(NotificationReceiver::class, 'id', 'notification_id');
}
// Relasi
}