New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Where to add spa routes? #673

Open
hkmsadek opened this Issue Dec 2, 2018 · 1 comment

Comments

Projects
None yet
2 participants
@hkmsadek

hkmsadek commented Dec 2, 2018

I am trying to add a spa route in web.php (not in any modules)


// spa routes...
Route::any('{slug}', function(){
    return view('welcome');
})->where('slug', '([A-z\d-\/_.]+)?');

Normally this works for normal set up and this code has to be AT THE END OF THE WEB.PHP file.
I have few more routes in a User module. This spa runs if i call the user/login routes. This spa route should run if any route matches are not found.

How to do this? Thanks

@nWidart

This comment has been minimized.

Owner

nWidart commented Dec 3, 2018

You can look at the page module which has this kind of route too.
The key is the order of the modules.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment