Published 1 week ago by Neewd
I am quite a new guy on Laravel and I have started working on a project, and I would like get some advice about the good architecture to pick.
I decided to manage my front with Vue and my backend with Laravel.
What I have started to do is to capture the routes through Laravel and sent it to my Vue routes to determines which components to load etc. And I was thinking to make "api" calls though axios into my Vue.components to retrieve the data from my controller in order to display them into my view.
That's still a "web" logic.
But I am also thinking to the future API I will provide.
So what is the best option to take ?
Put some Route::resource('model', 'Controller') into the web.php file, then call those routes in my Vue.components, and put the Route::resource('model','Controller') into my api.php file ?
Thank you for your answer I don't know if I am going the right way or not.
If I want to use the CreateFreshApiToken, it comes from Passport, how I can use this without Passport ? :o