PolarNotification::user()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 4
rs 10
c 0
b 0
f 0
cc 1
eloc 2
nc 1
nop 0
1
<?php
2
3
namespace PolarAdmin\Polar\Models;
4
5
use PolarAdmin\Polar\Polar;
6
use Illuminate\Database\Eloquent\Model;
7
8
class PolarNotification extends Model
9
{
10
    protected $table = 'polar_notifications';
11
12
    protected $guarded = [];
13
14
    protected $hidden = [];
15
16
    protected $casts = [
17
        'id' => 'int',
18
        'user_id' => 'int',
19
        'extra' => 'array',
20
        'read' => 'bool',
21
    ];
22
23
    public function user()
24
    {
25
        return $this->belongsTo(Polar::userModel(), 'user_id');
26
    }
27
}
28