Internal requests

Submitted by xtrasmal - 5 years ago

If you have an API, which you also use on your site..then you might want to get the data from the API by making an internal request.

// ready the request
$request = Request::create('api/posts', 'GET');
// handle the response
$response = Route::dispatch($request);

// do something amazing
comments powered by Disqus