Conditions | 2 |
Paths | 2 |
Total Lines | 10 |
Code Lines | 5 |
Lines | 0 |
Ratio | 0 % |
Changes | 0 |
1 | <?php namespace GeneaLabs\LaravelModelCaching; |
||
42 | public function cache(array $tags = []) |
||
43 | { |
||
44 | $cache = cache(); |
||
45 | |||
46 | if (is_subclass_of(cache()->getStore(), TaggableStore::class)) { |
||
47 | array_push($tags, str_slug(get_called_class())); |
||
48 | $cache = cache()->tags($tags); |
||
49 | } |
||
50 | |||
51 | return $cache; |
||
52 | } |
||
59 |