2017 © Pedro Peláez
 

package laravel-sub-request

A helper and facade for making internal API sub requests to your application

image

myerscode/laravel-sub-request

A helper and facade for making internal API sub requests to your application

  • Friday, February 23, 2018
  • by oniice
  • Repository
  • 1 Watchers
  • 1 Stars
  • 2,196 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 3 Versions
  • 40 % Grown

The README.md

Laravel Sub Request

a helper and facade for making internal sub requests to your application API, (*1)

Latest Stable Version Total Downloads License, (*2)

By sending a sub request within the application, you can simply consume your applications API without having to send seperate, slower HTTP requests., (*3)

Install

You can install this package via composer:, (*4)

``` bash composer require myerscode/laravel-sub-request, (*5)


## Setup #### Laravel >=5.5 The package will be auto discovered. #### Laravel 5.4 Add `Myerscode\Laravel\SubRequest\SubRequestProvider` to the `providers` array in `config/app.php` ## Usage In your controller you can inject the sub request component into your class or use the `SubRequest` facade or the global helper method `subrequest`. ```php namespace App\Controllers; class MyController { public function __contstruct(Dispatcher $subRequest) { $this->subRequest = $subRequest; } public function routeOne() { return $this->subRequest->dispatch('POST', '/auth', ['foo' => 'bar']) } public function routeTwo() { return SubRequest::dispatch('GET', '/details', ['foo' => 'bar']) } public function routeThree() { return subrequest('GET', '/details', ['foo' => 'bar']) } ... }

The Versions

23/02 2018

dev-develop

dev-develop https://github.com/myerscode/laravel-sub-request

A helper and facade for making internal API sub requests to your application

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel requests sub sub-request

06/10 2017

dev-master

9999999-dev https://github.com/myerscode/laravel-sub-request

A helper and facade for making internal API sub requests to your application

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel requests sub sub-request

06/10 2017

1.0.0

1.0.0.0 https://github.com/myerscode/laravel-sub-request

A helper and facade for making internal API sub requests to your application

  Sources   Download

MIT

The Requires

  • php >=7.0

 

The Development Requires

laravel requests sub sub-request