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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

27 lines
668 B
PHP
Raw Normal View History

2018-05-09 08:05:17 -05:00
<?php
namespace App\Models;
use Illuminate\Database\Eloquent\Model;
use Illuminate\Database\Eloquent\Relations\BelongsTo;
2018-05-09 08:05:17 -05:00
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 ----
public function user(): BelongsTo
2018-05-09 08:05:17 -05:00
{
return $this->belongsTo(\App\Models\User::class, 'user_id');
2018-05-09 08:05:17 -05:00
}
public function notification(): BelongsTo
2018-05-09 08:05:17 -05:00
{
return $this->belongsTo(\App\Models\Notification::class, 'notifications_id');
2018-05-09 08:05:17 -05:00
}
}