@@ -4,37 +4,37 @@ |
||
4 | 4 | // mix('js/app.js') |
5 | 5 | function mix($path, $json = false, $shouldHotReload = false) |
6 | 6 | { |
7 | - if (! $json) { |
|
8 | - static $json; |
|
9 | - } |
|
10 | - if (! $shouldHotReload) { |
|
11 | - static $shouldHotReload; |
|
12 | - } |
|
7 | + if (! $json) { |
|
8 | + static $json; |
|
9 | + } |
|
10 | + if (! $shouldHotReload) { |
|
11 | + static $shouldHotReload; |
|
12 | + } |
|
13 | 13 | |
14 | - if (! $json) { |
|
15 | - $manifestPath = public_path('manifest.json'); |
|
16 | - $shouldHotReload = file_exists(public_path('hot')); |
|
14 | + if (! $json) { |
|
15 | + $manifestPath = public_path('manifest.json'); |
|
16 | + $shouldHotReload = file_exists(public_path('hot')); |
|
17 | 17 | |
18 | - if (! file_exists($manifestPath)) { |
|
19 | - throw new Exception( |
|
20 | - 'The Laravel Mix manifest file does not exist. '. |
|
21 | - 'Please run "npm run webpack" and try again.' |
|
22 | - ); |
|
23 | - } |
|
18 | + if (! file_exists($manifestPath)) { |
|
19 | + throw new Exception( |
|
20 | + 'The Laravel Mix manifest file does not exist. '. |
|
21 | + 'Please run "npm run webpack" and try again.' |
|
22 | + ); |
|
23 | + } |
|
24 | 24 | |
25 | - $json = json_decode(file_get_contents($manifestPath), true); |
|
26 | - } |
|
25 | + $json = json_decode(file_get_contents($manifestPath), true); |
|
26 | + } |
|
27 | 27 | |
28 | - $path = pathinfo($path, PATHINFO_BASENAME); |
|
28 | + $path = pathinfo($path, PATHINFO_BASENAME); |
|
29 | 29 | |
30 | - if (! array_key_exists($path, $json)) { |
|
31 | - throw new Exception( |
|
32 | - 'Unknown file path. Please check your requested '. |
|
33 | - 'webpack.mix.js output path, and try again.' |
|
34 | - ); |
|
35 | - } |
|
30 | + if (! array_key_exists($path, $json)) { |
|
31 | + throw new Exception( |
|
32 | + 'Unknown file path. Please check your requested '. |
|
33 | + 'webpack.mix.js output path, and try again.' |
|
34 | + ); |
|
35 | + } |
|
36 | 36 | |
37 | - return $shouldHotReload |
|
38 | - ? "http://localhost:8080{$json[$path]}" |
|
39 | - : url($json[$path]); |
|
37 | + return $shouldHotReload |
|
38 | + ? "http://localhost:8080{$json[$path]}" |
|
39 | + : url($json[$path]); |
|
40 | 40 | } |
@@ -4,18 +4,18 @@ discard block |
||
4 | 4 | // mix('js/app.js') |
5 | 5 | function mix($path, $json = false, $shouldHotReload = false) |
6 | 6 | { |
7 | - if (! $json) { |
|
7 | + if (!$json) { |
|
8 | 8 | static $json; |
9 | 9 | } |
10 | - if (! $shouldHotReload) { |
|
10 | + if (!$shouldHotReload) { |
|
11 | 11 | static $shouldHotReload; |
12 | 12 | } |
13 | 13 | |
14 | - if (! $json) { |
|
14 | + if (!$json) { |
|
15 | 15 | $manifestPath = public_path('manifest.json'); |
16 | 16 | $shouldHotReload = file_exists(public_path('hot')); |
17 | 17 | |
18 | - if (! file_exists($manifestPath)) { |
|
18 | + if (!file_exists($manifestPath)) { |
|
19 | 19 | throw new Exception( |
20 | 20 | 'The Laravel Mix manifest file does not exist. '. |
21 | 21 | 'Please run "npm run webpack" and try again.' |
@@ -27,7 +27,7 @@ discard block |
||
27 | 27 | |
28 | 28 | $path = pathinfo($path, PATHINFO_BASENAME); |
29 | 29 | |
30 | - if (! array_key_exists($path, $json)) { |
|
30 | + if (!array_key_exists($path, $json)) { |
|
31 | 31 | throw new Exception( |
32 | 32 | 'Unknown file path. Please check your requested '. |
33 | 33 | 'webpack.mix.js output path, and try again.' |