I have an interesting question about Laravel Eloquent usage. I'm writing an admin panel based on Laravel with Nova. It should to send request and receive a response to a rest api. Is there any solution to use my eloquent models as an "api request"?
I'm thinking about if I make the following: User::all() and after this, in the background the api send a request to the api's "users end-point", and I get back a collection ?
It may call this some "api driver" instead of mysql driver, or some adapter for this, but I don't know where I should to looking for, or what I have to do.
It would be nice if I can use this because, I can use the all of eloquent features on the response json.