NotificationAttrib   A
last analyzed

Complexity

Total Complexity 2

Size/Duplication

Total Lines 40
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 1

Importance

Changes 0
Metric Value
dl 0
loc 40
rs 10
c 0
b 0
f 0
wmc 2
lcom 0
cbo 1

2 Methods

Rating   Name   Duplication   Size   Complexity  
A user() 0 4 1
A notification() 0 4 1
1
<?php
2
3
namespace App\Models;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
/**
8
 * App\Models\NotificationAttrib
9
 *
10
 * @property integer $attrib_id
11
 * @property integer $notifications_id
12
 * @property integer $user_id
13
 * @property string $key
14
 * @property string $value
15
 * @property-read \App\Models\User $user
16
 * @property-read \App\Models\Notification $notification
17
 * @method static \Illuminate\Database\Query\Builder|\App\Models\NotificationAttrib whereAttribId($value)
18
 * @method static \Illuminate\Database\Query\Builder|\App\Models\NotificationAttrib whereNotificationsId($value)
19
 * @method static \Illuminate\Database\Query\Builder|\App\Models\NotificationAttrib whereUserId($value)
20
 * @method static \Illuminate\Database\Query\Builder|\App\Models\NotificationAttrib whereKey($value)
21
 * @method static \Illuminate\Database\Query\Builder|\App\Models\NotificationAttrib whereValue($value)
22
 * @mixin \Eloquent
23
 */
24
class NotificationAttrib extends Model
25
{
26
27
    /**
28
     * Indicates if the model should be timestamped.
29
     *
30
     * @var bool
31
     */
32
    public $timestamps = false;
33
    /**
34
     * The table associated with the model.
35
     *
36
     * @var string
37
     */
38
    protected $table = 'notifications_attribs';
39
    /**
40
     * The primary key column name.
41
     *
42
     * @var string
43
     */
44
    protected $primaryKey = 'attrib_id';
45
46
    // ---- Define Relationships ----
47
48
    /**
49
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
50
     */
51
    public function user()
52
    {
53
        return $this->belongsTo('App\Models\User', 'user_id');
54
    }
55
56
    /**
57
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
58
     */
59
    public function notification()
60
    {
61
        return $this->belongsTo('App\Models\Notification', 'notifications_id');
62
    }
63
}
64