| Conditions | 4 |
| Paths | 1 |
| Total Lines | 8 |
| Code Lines | 6 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 2 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 14 | protected static function bootHasDynamicColumn() |
||
| 15 | { |
||
| 16 | static::addGlobalScope(new DynamicScope()); |
||
| 17 | static::saving( |
||
| 18 | function($model) { |
||
| 19 | foreach ($model->getCasts() as $column => $cast) { |
||
| 20 | if ($cast == 'Halalsoft\LaravelDynamicColumn\Dynamic' || $cast == "Halalsoft\LaravelDynamicColumn\DynamicObject") { |
||
| 21 | $model->$column = $model->$column; |
||
| 22 | } |
||
| 52 | } |