0
votes

I try to call my own api with laravel I tried all the options like: in the answers: Consuming my own Laravel API

or in this blog: http://blog.antoine-augusti.fr/2014/04/laravel-calling-your-api/

and this plugin: https://github.com/teepluss/laravel4-hmvc

sorry for sound dumb I dont understand all the things but they not make full 100% real request like for example with normal ajax post request i can do this to get some parameter: Request::createFromGlobals()->request->get('some-parameter')

but with the others techniqe this just return null I am using this way becase thats the way how "thephpleague/oauth2-server" plugin get the post parametrs ( https://github.com/thephpleague/oauth2-server/blob/master/src/AuthorizationServer.php#L234 )

so my question: is there a real way to call other route and to make it 100% look like normal request?

2

2 Answers

0
votes

From what it sounds like you are trying to do you could use Snoopy or cURL to make actual calls.

The real question is why do these need to be actual calls? The first link you posted has some really great examples that would work well for any calls that go directly back to your Laravel application. That article linked to a module called HMVC which keeps your code looking neat and simplifies the process.

0
votes

Any HTTP Client will do this.