@@ 12-32 (lines=21) @@ | ||
9 | * @author PyroCMS, Inc. <[email protected]> |
|
10 | * @author Ryan Thompson <[email protected]> |
|
11 | */ |
|
12 | class ViewMobileOverrides extends Collection |
|
13 | { |
|
14 | ||
15 | /** |
|
16 | * When putting overrides replace "/" with "." |
|
17 | * to match the way Laravel interprets views. |
|
18 | * |
|
19 | * @param mixed $key |
|
20 | * @param mixed $value |
|
21 | */ |
|
22 | public function put($key, $value) |
|
23 | { |
|
24 | $overrides = []; |
|
25 | ||
26 | foreach ($value as $view => $override) { |
|
27 | $overrides[str_replace('/', '.', $view)] = $override; |
|
28 | } |
|
29 | ||
30 | parent::put($key, $overrides); |
|
31 | } |
|
32 | } |
|
33 |
@@ 12-32 (lines=21) @@ | ||
9 | * @author PyroCMS, Inc. <[email protected]> |
|
10 | * @author Ryan Thompson <[email protected]> |
|
11 | */ |
|
12 | class ViewOverrides extends Collection |
|
13 | { |
|
14 | ||
15 | /** |
|
16 | * When putting overrides replace "/" with "." |
|
17 | * to match the way Laravel interprets views. |
|
18 | * |
|
19 | * @param mixed $key |
|
20 | * @param mixed $value |
|
21 | */ |
|
22 | public function put($key, $value) |
|
23 | { |
|
24 | $overrides = []; |
|
25 | ||
26 | foreach ($value as $view => $override) { |
|
27 | $overrides[str_replace('/', '.', $view)] = $override; |
|
28 | } |
|
29 | ||
30 | parent::put($key, $overrides); |
|
31 | } |
|
32 | } |
|
33 |