UserLog::user()   A
last analyzed

Complexity

Conditions 1
Paths 1

Size

Total Lines 3
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 0
Metric Value
dl 0
loc 3
rs 10
c 0
b 0
f 0
cc 1
eloc 1
nc 1
nop 0
1
<?php
2
3
namespace Apps\ActiveRecord;
4
5
use Ffcms\Core\Arch\ActiveModel;
6
7
/**
8
 * Class UserLog. Active record model.
9
 * @property int $id
10
 * @property int $user_id
11
 * @property string $type
12
 * @property string $message
13
 * @property string $created_at
14
 * @property string $updated_at
15
 */
16
class UserLog extends ActiveModel
17
{
18
    protected $casts = [
19
        'id' => 'integer',
20
        'user_id' => 'integer',
21
        'type' => 'string',
22
        'message' => 'string'
23
    ];
24
25
    /**
26
     * Get user object as relation
27
     * @return \Illuminate\Database\Eloquent\Relations\BelongsTo
28
     */
29
    public function user()
30
    {
31
        return $this->belongsTo(User::class);
32
    }
33
}
34