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