Download the PHP package digitalcloud/laravel-forwarder without Composer

On this page you can find all versions of the php package digitalcloud/laravel-forwarder. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-forwarder

Latest Stable Version Total Downloads

Laravel Forwarder.

This package allow you to forward the request from your project to another link. The forwarded request will be carry all original information.

This package is also give you the capability to get the response inside your code, and manipulate it before returning it as a final response.

Much more, you can also modify the request before sending it to the remote link as you need.

Installation

You can install the package via composer:

In Laravel 5.5 the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php file:

After installation, you need to register the middleware "Forward" into your kernel in "routeMiddleware" array

How To Use

Now you can use new function on your route file as

This route function will make a request in background to the specified domain followed by the route

For example, the above sample will forward post request to "http://example.com/posts".

Note:

If you using api.php route file, the above sample will forward to "http://example.com/api/posts"

After the request handled, the package will pass the result as "response" property in the request to the function 'PostController@index', which you can handle, update, and return result

Before Request

Do you need to update the request before send?? it's very simple, just create a function on the same controller with prefix "before"

For example, if the function name on your controller is "index", you have to make another one with "beforeIndex" name and the package will take care of the remain

Note:

Note that any before function should return "Request" object so that can be passed to the remain chain.


All versions of laravel-forwarder with dependencies

PHP Build Version
Package Version
Requires php Version >=7.1.0
guzzlehttp/guzzle Version ~6.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digitalcloud/laravel-forwarder contains the following files

Loading the files please wait ....