Hello, let's suppose that my application, a Post belongs to a user. In the PostController in the create method, we look for all the users ($users = User::all()), and we call the users in the blade through the foreach. Now, how do I get these same users when registering a Post using API with vueJs, when I can't use create method?
Grateful!
If understand what you are saying for some reason you need the $users to be available at the Vue page where you can create a post. In the context of Vue + API the way todo it is to have a dedicated endpoint to grab the users. At your Vue page you can then call this endpoint and get the users.
Still don't understand the need of getting all users but you know better.