Laravel API and seperate Vue frontend pusher integration
Hello,
I have built a Laravel API, and I want to make a vue front end for this.
Would I have to put this frontend into a seperate laravel application for the laravel echo/pusher integration, or can I just create a normal Vue-CLI application?
Would I have to put this frontend into a seperate laravel application for the laravel echo/pusher integration
You can but you can also put it into same Laravel app.
or can I just create a normal Vue-CLI application?
You can also go with this approach.
I decide based on the size of the app. If the app is going to be huge then I use one repo for Laravel API and one repo for Vue app created by Vue-CLI. But if it is going to be a small app then I leave everything in one repo created by laravel new.
In my case, there will be multiple (diffrent/custom) front-ends mady and maintained by me and my collegues.
so it will have to be diffrent repo's. As for a follow-up question; How would I integrate this? Like the normal Laravel Echo way? or do I need to do it all by hand?
I would go with "normal Laravel Echo" way. I think that there is a tutorial here on Laracasts for Laravel Echo. You just have to adjust it a bit to your separate app setup for frontend and backend.
@justinrijsdijk CSRF is by default only required for routes that are in routes/web.php file. All routes within routes/api.php do not require CSRF (by default). If you changed something in the app/Http/Kernel.php for api routes regarding CSRF then I advise you to revert it to original state.