Powiadomienia
Wyczyść wszystko
BugOverflow
1
Wpisy
1
Użytkownicy
0
Reactions
726
Widoki
0
21/05/2023 7:31 pm
Rozpoczynający temat
example
1 odpowiedź
0
21/05/2023 7:33 pm
Rozpoczynający temat
open routes/web.php, and paste something simmilar.
//VUE ROUTER
Route::get('/{any}', function () {
if (Auth::user()) {
return view('user-welcome');
} else {
return view('guest-welcome');
}
})->where('any', '(.*)');
no any link will always redirect to your user-welcome or guest-welcome view and load vue components, always
then add in same file prefix for API calls
Route::prefix('api')->group(function () {
Route::resource('forms', FormsController::class);
Route::resource('somethings', SomethingsController::class);
});
Ten wpis został zmodyfikowany 3 lata temu 2 razy przez mrmucha
