1 | <?php |
||
8 | class Level extends Model |
||
9 | { |
||
10 | protected $casts = ['id' => 'integer', 'rank' => 'integer']; |
||
11 | protected $guarded = ['id', 'created_id', 'updated_at']; |
||
12 | |||
13 | use UserAndLevel; |
||
14 | |||
15 | /** |
||
16 | * LEVEL |
||
17 | * A Level has many users |
||
18 | * |
||
19 | * @return mixed |
||
20 | */ |
||
21 | 2 | public function users() |
|
25 | |||
26 | /** |
||
27 | * LEVEL |
||
28 | * A level has many permissions |
||
29 | * |
||
30 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
31 | */ |
||
32 | 13 | public function permissions() |
|
38 | |||
39 | |||
40 | /* ------------------------------------------------------------------------------------------------ |
||
41 | | Other Functions |
||
42 | | ------------------------------------------------------------------------------------------------ |
||
43 | */ |
||
44 | /** |
||
45 | * Handle model events |
||
46 | */ |
||
47 | 48 | public static function boot() |
|
58 | } |
||
59 |