Passed
Pull Request — master (#610)
by John
05:33
created

UserPermission::user()   A

Complexity

Conditions 1
Paths 1

Size

Total Lines 2
Code Lines 1

Duplication

Lines 0
Ratio 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
cc 1
eloc 1
nc 1
nop 0
dl 0
loc 2
rs 10
c 1
b 0
f 1
1
<?php
2
3
namespace App\Models\Eloquent;
4
5
use Illuminate\Database\Eloquent\Model;
6
7
class UserPermission extends Model
8
{
9
    protected $fillable=[
10
        'user_id', 'permission_id'
11
    ];
12
13
    public static $permInfo=[
14
        '1' => 'Show site admin badge and allow frontend access to admin portal',
15
        // Why 26 you may ask? Praise be the all-mighty samsung AC that keeps my room at 26 celsius.
16
        '26' => 'Allow access to image hosting services',
17
    ];
18
19
    public function user() {
20
        return $this->belongsTo('App\Models\Eloquent\User');
21
    }
22
}
23