VueGuardModel   A
last analyzed

Complexity

Total Complexity 3

Size/Duplication

Total Lines 43
Duplicated Lines 0 %

Coupling/Cohesion

Components 0
Dependencies 0

Importance

Changes 0
Metric Value
dl 0
loc 43
rs 10
c 0
b 0
f 0
wmc 3
lcom 0
cbo 0

3 Methods

Rating   Name   Duplication   Size   Complexity  
A workflow() 0 3 1
A transition() 0 3 1
A permission() 0 3 1
1
<?php namespace Bantenprov\VueGuard\Models;
2
3
use Illuminate\Database\Eloquent\Model;
4
use Illuminate\Database\Eloquent\SoftDeletes;
5
use Emadadly\LaravelUuid\Uuids;
6
7
/**
8
 * The VueGuardModel class.
9
 *
10
 * @package Bantenprov\VueGuard
11
 * @author  bantenprov <[email protected]>
12
 */
13
class VueGuardModel extends Model
14
{
15
    use SoftDeletes;
16
    use Uuids;
17
    /**
18
    * Table name.
19
    *
20
    * @var string
21
    */
22
    protected $table = 'workflow_guards';
23
24
    /**
25
    * The attributes that are mass assignable.
26
    *
27
    * @var mixed
28
    */
29
    protected $fillable = ['workflow_id', 'transition_id', 'permission_id', 'label', 'name'];
30
31
    /**
32
     * The attributes that should be hidden for arrays.
33
     *
34
     * @var array
35
     */
36
    protected $hidden = [];
37
38
    //[Function] workflow
39
    public function workflow(){
40
        return $this->belongsTo('Bantenprov\VueWorkflow\Models\Workflow','workflow_id');
41
    }
42
43
    //[Function] transition
44
    public function transition(){
45
        return $this->belongsTo('Bantenprov\VueWorkflow\Models\Transition','transition_id');
46
    }
47
48
    //[Function] permission
49
    public function permission(){
50
        return $this->belongsTo('App\Permission','permission_id');
51
    }
52
    
53
    
54
    
55
}
56