38 lines
592 B
PHP
38 lines
592 B
PHP
<?php
|
|
|
|
namespace App\Models;
|
|
|
|
use Illuminate\Database\Eloquent\Model;
|
|
|
|
class Notification extends Model
|
|
{
|
|
/**
|
|
* @var string
|
|
*/
|
|
|
|
protected $table = 'notification';
|
|
|
|
/**
|
|
* @var string
|
|
*/
|
|
|
|
protected $primaryKey = 'notif_id';
|
|
|
|
/**
|
|
* @var boolean
|
|
*/
|
|
|
|
public $timestamps = false;
|
|
|
|
|
|
protected $fillable = ['notif_name', 'notif_email', 'notif_campId'];
|
|
|
|
/**
|
|
* ManyToOne
|
|
* Notification -> Campagne
|
|
*/
|
|
public function campagne()
|
|
{
|
|
return $this->belongsTo(\App\Models\Campagne::class, 'notif_campId');
|
|
}
|
|
}
|