| Conditions | 3 |
| Paths | 4 |
| Total Lines | 9 |
| Code Lines | 5 |
| Lines | 0 |
| Ratio | 0 % |
| Changes | 1 | ||
| Bugs | 0 | Features | 0 |
| 1 | <?php |
||
| 13 | public function indexAttribute() |
||
| 14 | { |
||
| 15 | $attributes = config('coderz.caching', true) |
||
| 16 | ? (Cache::has('attributes') ? Cache::get('attributes') : Cache::rememberForever('attributes', function () { |
||
| 17 | return Attribute::orderBy('position')->get(); |
||
| 18 | })) |
||
| 19 | : Attribute::orderBy('position')->get(); |
||
| 20 | |||
| 21 | return compact('attributes'); |
||
| 22 | } |
||
| 60 |