Passed
Push — master ( 2c7b25...f52af3 )
by Mihail
05:14
created

UserNotification::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 4
Code Lines 2

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
cc 1
eloc 2
c 1
b 0
f 0
nc 1
nop 0
dl 0
loc 4
rs 10
1
<?php
2
3
namespace Apps\ActiveRecord;
4
5
6
use Ffcms\Core\Arch\ActiveModel;
7
8
/**
9
 * Class UserNotification. Active record model for user notifications
10
 * @package Apps\ActiveRecord
11
 * @property int $id
12
 * @property int $user_id
13
 * @property string $msg
14
 * @property string $uri
15
 * @property string $vars
16
 * @property int $readed
17
 * @property string $created_at
18
 * @property string $updated_at
19
 */
20
class UserNotification extends ActiveModel
21
{
22
    /**
23
     * Get user object as relation
24
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
25
     */
26
    public function user()
27
    {
28
        return $this->belongsTo('Apps\ActiveRecord\User');
29
    }
30
}