I have the following in my web.php
. It's a route to my React application.
Route::get('/{path?}', function () {
return view( 'welcome' );
})->where('path', '.*');
I would want of instead return view( 'welcome' );
to have
return view('welcome')->with([
"globalData" => collect([
'user' => Auth::user()
]);
And I'm having a syntax error, perhaps a typo ?