| Total Complexity | 4 |
| Total Lines | 32 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | <?php |
||
| 5 | trait HasStatus |
||
| 6 | { |
||
| 7 | |||
| 8 | /** |
||
| 9 | * Boot the Active Events trait for a model. |
||
| 10 | * |
||
| 11 | * @return void |
||
| 12 | */ |
||
| 13 | public static function bootHasStatus() |
||
| 14 | { |
||
| 15 | static::addGlobalScope(new StatusScope); |
||
| 16 | } |
||
| 17 | |||
| 18 | |||
| 19 | /** |
||
| 20 | * Get the name of the "deleted at" column. |
||
| 21 | * |
||
| 22 | * @return string |
||
| 23 | */ |
||
| 24 | public function getStatusColumn() |
||
| 25 | { |
||
| 26 | return defined('static::STATUS') ? static::STATUS : 'status'; |
||
|
|
|||
| 27 | } |
||
| 28 | |||
| 29 | /** |
||
| 30 | * Get the fully qualified "deleted at" column. |
||
| 31 | * |
||
| 32 | * @return string |
||
| 33 | */ |
||
| 34 | public function getQualifiedStatusColumn() |
||
| 37 | } |
||
| 38 | |||
| 39 | } |
||
| 40 |