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

UserPermission   A

Complexity

Total Complexity 1

Size/Duplication

Total Lines 14
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 1
Metric Value
eloc 7
dl 0
loc 14
rs 10
c 1
b 0
f 1
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A user() 0 2 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