using laravel with vuejs , api based or traditional way
i want to write a shop , i am using laravel and for my front end i will surely pick vuejs now my question is should i fully use laravel api and call them in another vuejs project or is it better to use traditional way to send variable and data to a vuejs component which is implemented in laravel , i wanna know the cons and pros and if there is any possible way to use the vue js implemented in laravel to call apis and use api in there or any best practice or any good tutorial about using vuejs with laravel through api . thanks
If you intend to expose the api to third party clients then that would justify building an api; otherwise server rendered with sprinkling of JS would be my opinion. Look at Livewire or Inertia if you want another alternative
yes thats good point but i can do as traditional way and yet make api to send data to third party client . what confused me is that i dont know which approach would be more efficient and better approach for some kind a big projects
That depends on you, no-one can answer that for you and what the project is intended to be/do!
If it is a personal project as a learning exercise, then you shouldn't constrain yourself. If it is something you are developing for a third party, then I would suggest not to take on too much of what you do not know because deadlines and quality possibly will suffer. You can always develop elements as an SPA later when the domain is well understood.
Ultimately, that is an opinion on the internet, you are free to develop what you want and how you want ;-)
Another thing that may help you is browse similar type "shops" on Github. You may gather some good ideas of how others have written this type of application. Just a suggestion.
thanks thats a good idea i see most of them like bagisto they did it modular base i mean each part is a component that works seperatly and files are seperated is that the right thing to do in laravel ?? are there any good packages or ways for this ?? and they mostly did in traditional way