| Total Complexity | 3 |
| Total Lines | 24 |
| Duplicated Lines | 0 % |
| Coverage | 100% |
| Changes | 0 | ||
| 1 | <?php |
||
| 16 | class CacheObserver extends Observer |
||
| 17 | { |
||
| 18 | /** |
||
| 19 | * @param Cacheable | \Eloquent $model |
||
| 20 | */ |
||
| 21 | 25 | public function created($model) |
|
| 22 | { |
||
| 23 | 25 | $model::cache()->store($model); |
|
|
|
|||
| 24 | 25 | } |
|
| 25 | |||
| 26 | /** |
||
| 27 | * @param Cacheable | \Eloquent $model |
||
| 28 | */ |
||
| 29 | 1 | public function updated($model) |
|
| 32 | 1 | } |
|
| 33 | |||
| 34 | /** |
||
| 35 | * @param Cacheable | \Eloquent $model |
||
| 36 | */ |
||
| 37 | 1 | public function deleted($model) |
|
| 42 |