1 | <?php namespace Arcanedev\LaravelAuth\Models\Traits; |
||
13 | trait Activatable |
||
14 | { |
||
15 | /* ----------------------------------------------------------------- |
||
16 | | Main Methods |
||
17 | | ----------------------------------------------------------------- |
||
18 | */ |
||
19 | |||
20 | /** |
||
21 | * Activate/deactivate the model. |
||
22 | * |
||
23 | * @param bool $active |
||
24 | * @param bool $save |
||
25 | * |
||
26 | * @return bool |
||
27 | */ |
||
28 | 9 | protected function switchActive($active, $save = true) |
|
34 | |||
35 | /** |
||
36 | * Fill the model with an array of attributes. Force mass assignment. |
||
37 | * |
||
38 | * @param array $attributes |
||
39 | * |
||
40 | * @return self |
||
41 | */ |
||
42 | abstract public function forceFill(array $attributes); |
||
43 | |||
44 | /* ----------------------------------------------------------------- |
||
45 | | Check Methods |
||
46 | | ----------------------------------------------------------------- |
||
47 | */ |
||
48 | |||
49 | /** |
||
50 | * Check if the model is active. |
||
51 | * |
||
52 | * @return bool |
||
53 | */ |
||
54 | 75 | public function isActive() |
|
58 | } |
||
59 |