I'm doing a SPA with the default Laravel scaffolding:
// Generate basic scaffolding...
php artisan ui vue
// Generate login / registration scaffolding...
php artisan ui vue --auth
This gives us a good starting point with Laravel and Vuejs. It works as expected except for the fact that I would want to serve the SPA, so the .js files, only after user logged in. This requires also to remove the javascript files from the public folder otherwise people would still be able to access the content (not the data of course because it is loaded only for logged in user because of protected routes).
So what I would want to do is protect the resources in the same way you would do to access database data behind auth routes. That wouldn't be enough since I also need to move the created js files made of vue files out of the public folder. If I am not mistaken that happens within webpack?
Best Regards Pouissante