ldc-mesbr-app/app/Models/Notification.php

39 lines
592 B
PHP
Raw Permalink Normal View History

2019-01-15 14:17:15 +01:00
<?php
namespace App\Models;
2019-01-15 14:17:15 +01:00
use Illuminate\Database\Eloquent\Model;
class Notification extends Model
{
/**
* @var string
*/
2026-10-28 13:23:49 +01:00
2019-01-15 14:17:15 +01:00
protected $table = 'notification';
/**
* @var string
*/
2026-10-28 13:23:49 +01:00
2019-01-15 14:17:15 +01:00
protected $primaryKey = 'notif_id';
/**
2025-04-03 09:30:16 +02:00
* @var boolean
2019-01-15 14:17:15 +01:00
*/
2026-10-28 13:23:49 +01:00
2019-01-15 14:17:15 +01:00
public $timestamps = false;
2026-10-28 13:23:49 +01:00
protected $fillable = ['notif_name', 'notif_email', 'notif_campId'];
2019-01-15 14:17:15 +01:00
/**
* ManyToOne
* Notification -> Campagne
*/
public function campagne()
{
2026-10-28 12:27:46 +01:00
return $this->belongsTo(\App\Models\Campagne::class, 'notif_campId');
2019-01-15 14:17:15 +01:00
}
}