Here's what I want to do:
I want to create a simple REST API powered by Lumen, in a non-web accessible directory
I want a separate Laravel project (living on the same server) to be a client that consumes the API.
I want to consume that API via a common REST interface e.g.
I DON'T want to make actual HTTP requests, because I don't want the overhead, the API won't even be HTTP accessible, and I want Lumen to return Eloquent models instead of JSON so that it's far easier for me to pass those models through to blade for rendering.
EVENTUALLY I might make the lumen API web accessible with authentication so that you can set Accept headers to request application/json, but for now I want it to be internal only, and return native PHP code to Laravel.
Also eventually, I might move the Laravel client to a separate server on the same cluster, at which point I will want to enable HTTP requests via the internal network, which is why I want to make internal requests through an actual URI schema, so that I don't have to change anything. That is, I'll just hook up another API driver that actually makes HTTP requests and asks for JSON, and I never have to change any of the
So is there a way to do something like this between a separate Lumen and Laravel project?
Essentially I would create a request object that mocks the URI and request method in Laravel, but invoke that via the Lumen codebase's route dispatcher. Is it as simple as that, or do I need to find a way to get Lumen to go through it's boot process?