File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -68,9 +68,9 @@ public function addView(View $view)
68
68
// Prevent duplicates
69
69
$ hash = $ type . $ path . $ name . $ this ->collect_data ? implode (array_keys ($ view ->getData ())) : '' ;
70
70
71
- if (class_exists ('\Inertia\Inertia ' ) && isset ($ data ['page ' ], $ data ['component ' ])) {
72
- $ data = $ data ['page ' ];
73
- $ name = $ data ['component ' ];
71
+ if (class_exists ('\Inertia\Inertia ' ) && isset ($ data ['page ' ][ ' props ' ] , $ data[ ' page ' ] ['component ' ])) {
72
+ $ name = $ data ['page ' ][ ' component ' ];
73
+ $ data = $ data ['page ' ][ ' props ' ];
74
74
75
75
if (!@file_exists ($ path = resource_path ('js/Pages/ ' . $ name . '.js ' ))) {
76
76
if (!@file_exists ($ path = resource_path ('js/Pages/ ' . $ name . '.vue ' ))) {
@@ -106,7 +106,7 @@ public function addView(View $view)
106
106
}
107
107
108
108
if ($ this ->collect_data === 'keys ' ) {
109
- $ params = array_keys ($ view -> getData () );
109
+ $ params = array_keys ($ data );
110
110
} elseif ($ this ->collect_data ) {
111
111
$ params = array_map (
112
112
fn ($ value ) => $ this ->getDataFormatter ()->formatVar ($ value ),
You can’t perform that action at this time.
0 commit comments