Files
librenms-librenms/app/Models/NotificationAttrib.php
T

32 lines
742 B
PHP
Raw Normal View History

2018-05-09 08:05:17 -05:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
class NotificationAttrib extends Model
{
public $timestamps = false;
protected $table = 'notifications_attribs';
protected $primaryKey = 'attrib_id';
2018-09-11 07:51:35 -05:00
protected $fillable = ['notifications_id', 'user_id', 'key', 'value'];
2018-05-09 08:05:17 -05:00
// ---- Define Relationships ----
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function user()
{
return $this->belongsTo('App\Models\User', 'user_id');
}
/**
* @return \Illuminate\Database\Eloquent\Relations\BelongsTo
*/
public function notification()
{
return $this->belongsTo('App\Models\Notification', 'notifications_id');
}
}