28 lines
		
	
	
		
			489 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			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
 | 
						|
}
 |