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)
6868 // Prevent duplicates
6969 $ hash = $ type . $ path . $ name . $ this ->collect_data ? implode (array_keys ($ view ->getData ())) : '' ;
7070
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 ' ];
7474
7575 if (!@file_exists ($ path = resource_path ('js/Pages/ ' . $ name . '.js ' ))) {
7676 if (!@file_exists ($ path = resource_path ('js/Pages/ ' . $ name . '.vue ' ))) {
@@ -106,7 +106,7 @@ public function addView(View $view)
106106 }
107107
108108 if ($ this ->collect_data === 'keys ' ) {
109- $ params = array_keys ($ view -> getData () );
109+ $ params = array_keys ($ data );
110110 } elseif ($ this ->collect_data ) {
111111 $ params = array_map (
112112 fn ($ value ) => $ this ->getDataFormatter ()->formatVar ($ value ),
You can’t perform that action at this time.
0 commit comments