| 1 | <?php |
||
| 12 | class Level extends Model |
||
| 13 | { |
||
| 14 | protected $casts = ['id' => 'integer', 'rank' => 'integer']; |
||
| 15 | protected $guarded = ['id', 'created_id', 'updated_at']; |
||
| 16 | |||
| 17 | use UserAndLevel; |
||
| 18 | |||
| 19 | /** |
||
| 20 | * LEVEL |
||
| 21 | * A Level has many users |
||
| 22 | * |
||
| 23 | * @return mixed |
||
| 24 | */ |
||
| 25 | public function users() |
||
| 29 | |||
| 30 | /** |
||
| 31 | * LEVEL |
||
| 32 | * A level has many permissions |
||
| 33 | * |
||
| 34 | * @return \Illuminate\Database\Eloquent\Relations\HasMany |
||
| 35 | */ |
||
| 36 | public function permissions() |
||
| 42 | |||
| 43 | |||
| 44 | /* ------------------------------------------------------------------------------------------------ |
||
| 45 | | Other Functions |
||
| 46 | | ------------------------------------------------------------------------------------------------ |
||
| 47 | */ |
||
| 48 | /** |
||
| 49 | * Handle model events |
||
| 50 | */ |
||
| 51 | public static function boot() |
||
| 62 | } |
||
| 63 |