File tree Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Expand file tree Collapse file tree 2 files changed +14
-6
lines changed Original file line number Diff line number Diff line change 2
2
3
3
$ config = config ('inertia.testing ' , []);
4
4
5
- $ pagePaths = collect ($ config ['page_paths ' ] ?? [])->map (function ($ path ) {
6
- return LaravelVsCode::relativePath ($ path );
7
- });
5
+ $ pagePaths = collect ($ config ['page_paths ' ] ?? [])->flatMap (function ($ path ) {
6
+ $ relativePath = LaravelVsCode::relativePath ($ path );
7
+
8
+ // Folder with inertia pages views is usually uppercase (resources/js/Pages),
9
+ // but Laravel starter kits use lowercase (resources/js/pages)
10
+ return [$ relativePath , mb_strtolower ($ relativePath )];
11
+ })->unique ();
8
12
9
13
$ config ['page_paths ' ] = $ pagePaths ->toArray ();
10
14
Original file line number Diff line number Diff line change 2
2
export default `
3
3
$config = config('inertia.testing', []);
4
4
5
- $pagePaths = collect($config['page_paths'] ?? [])->map(function($path) {
6
- return LaravelVsCode::relativePath($path);
7
- });
5
+ $pagePaths = collect($config['page_paths'] ?? [])->flatMap(function($path) {
6
+ $relativePath = LaravelVsCode::relativePath($path);
7
+
8
+ // Folder with inertia pages views is usually uppercase (resources/js/Pages),
9
+ // but Laravel starter kits use lowercase (resources/js/pages)
10
+ return [$relativePath, mb_strtolower($relativePath)];
11
+ })->unique();
8
12
9
13
$config['page_paths'] = $pagePaths->toArray();
10
14
You can’t perform that action at this time.
0 commit comments