E
E
Emil Rakhmatullin2020-08-29 22:27:32
Laravel
Emil Rakhmatullin, 2020-08-29 22:27:32

How to properly set up Vue Router and Laravel?

I am learning how to make a SPA site.
Faced a problem. When I go through the routes, everything is OK, but when I go not to the main url and reload the page, I get 404. Please tell me how to make sure that this does not happen?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
W
WebDev, 2020-08-30
@kirill-93

This is what you need to set up the web server. Look for the config for your server.

V
Vladislav, 2020-09-04
@vos_50

In web.php create a Route::any that will intercept all requests and throw them into your handler, which will redirect to the input to your spa

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question