10/18/2023 0 Comments Vue router middleware![]() ![]() But for now my priority is the routing issue. Because otherwise navigateTo will fail, as there would be no route to go. Other semi-related problem is my routes aren't even appearning as links using router-link. EDIT: However, this would still need content inside /pages directory or some routes created via Vue Router. I've tried not giving all routing to vue-router and retaining the back-end routes that I had in web.php I've tried directing all of the routes to Vue to have vue-router handle the routing. I've tried going through different CRUD turorials on using Laravel and or Vue. I understand that Vue is supposed to take over the routing if you use a SPA, but is there any way to use both? I can't find anything that addresses this issue but I can't believe that Laravel would make you choose to either use their built-in commands like php artisan make:auth or have to scrap all of that and do it all manually if you want a SPA with routing. Import Categories from './components/Categories.vue' Import Videos from './components/Videos.vue' ![]() Based on project statistics from the GitHub repository for the npm package vue-router-middleware, we found that it has been starred 12 times. As such, we scored vue-router-middleware popularity level to be Limited. ![]() Route::get('/search', I also have a routes.js to have vue-router handle the routing with the following : import Home from './components/Home.vue' The npm package vue-router-middleware receives a total of 78 downloads a week. Route::resource('Categories', 'CategoriesController')->middleware('auth') Route::resource('Videos', 'VideoController')->middleware('auth','isAdmin') For example, I have my web.php like this, with several different routes. I was trying to convert my app into a SPA using Vue, however using routing with Vue causes issues with the routes defined in the web.php. However, I used Laravel to run php artisan make:auth and to create several different endpoints for the backend. I know how to create authentication with Bcrypt, for example. I'm new to Laravel and PHP in general, but familiar with Vue and SPA's. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |