@@ 144-151 (lines=8) @@ | ||
141 | * |
|
142 | * @return \Illuminate\Support\Collection |
|
143 | */ |
|
144 | public function load() |
|
145 | { |
|
146 | if (!file_exists($file = $this->getFileName())) { |
|
147 | return collect(); |
|
148 | } |
|
149 | ||
150 | return collect(json_decode(file_get_contents($file), true)); |
|
151 | } |
|
152 | ||
153 | /** |
|
154 | * Persist to database cache file. |
@@ 21-28 (lines=8) @@ | ||
18 | * |
|
19 | * @return \Illuminate\Support\Collection |
|
20 | */ |
|
21 | public function __load() |
|
22 | { |
|
23 | if (!file_exists($file = $this->getDatabaseFileName())) { |
|
24 | return collect(); |
|
25 | } |
|
26 | ||
27 | return collect(json_decode(file_get_contents($file), true)); |
|
28 | } |
|
29 | ||
30 | /** |
|
31 | * Get cache filename. |