PHPackages                             digitalcloud/laravel-forwarder - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [HTTP &amp; Networking](/categories/http)
4. /
5. digitalcloud/laravel-forwarder

ActiveLibrary[HTTP &amp; Networking](/categories/http)

digitalcloud/laravel-forwarder
==============================

Laravel package allows you to fetch data from external link and return it to a callback url

v1.0(7y ago)0822[1 issues](https://github.com/DigitalCloud/laravel-forwarder/issues)MITPHPPHP &gt;=7.1.0

Since Mar 18Pushed 7y ago2 watchersCompare

[ Source](https://github.com/DigitalCloud/laravel-forwarder)[ Packagist](https://packagist.org/packages/digitalcloud/laravel-forwarder)[ RSS](/packages/digitalcloud-laravel-forwarder/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (1)Dependencies (1)Versions (2)Used By (0)

[![Latest Stable Version](https://camo.githubusercontent.com/0d73aa48b723d7104a92534b6b2e2f0b434d19fd587889b4c9843ff4b4014b53/68747470733a2f2f706f7365722e707567782e6f72672f6469676974616c636c6f75642f6c61726176656c2d666f727761726465722f762f737461626c65)](https://packagist.org/packages/digitalcloud/laravel-forwarder)[![Total Downloads](https://camo.githubusercontent.com/130e39a0672f171bb4b49775c51432409dd2829b77cbde4720a0002fdb2afb29/68747470733a2f2f706f7365722e707567782e6f72672f6469676974616c636c6f75642f6c61726176656c2d666f727761726465722f646f776e6c6f616473)](https://packagist.org/packages/digitalcloud/laravel-forwarder)

Laravel Forwarder.
==================

[](#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
------------

[](#installation)

You can install the package via composer:

```
composer require digitalcloud/laravel-forwarder
```

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:

```
    'providers' => [
        DigitalCloud\Forwarder\ForwarderServiceProvider::class,
    ];
```

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

```
    protected $routeMiddleware => [
            ....
            'forward' =>  \DigitalCloud\Forwarder\Http\Middleware\Forward::class
    ];
```

How To Use
----------

[](#how-to-use)

Now you can use new function on your route file as

```
Route::forward(['post'], 'http://example.com', 'posts', 'PostController@index');
```

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 "".

### Note:

[](#note)

If you using api.php route file, the above sample will forward to ""

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

```
    public function index(Request $request)
    {
        $result = $request->response;

        return $result;
    }
```

Before Request
--------------

[](#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-1)

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

```
    public function beforeIndex(Request $request)
    {
        // make your request manipulations here
        $request = $request->merge(['token' => 'token', 'secret' => 'xxx']);

        // then return the final request
        return $request;
    }
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity10

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity55

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 83.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Unknown

Total

1

Last Release

2614d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1a11fa4bb6d4362819939f663d222719ef7de81b8029e31bb107826dc38cc1d5?d=identicon)[mohrajab](/maintainers/mohrajab)

![](https://www.gravatar.com/avatar/9fbc42d1a5302b500c217cf263e23a7229770174af3cc3a21b85ba2973c6f812?d=identicon)[devmtm](/maintainers/devmtm)

---

Top Contributors

[![mohrajab](https://avatars.githubusercontent.com/u/17740650?v=4)](https://github.com/mohrajab "mohrajab (5 commits)")[![devmtm](https://avatars.githubusercontent.com/u/41853913?v=4)](https://github.com/devmtm "devmtm (1 commits)")

---

Tags

responserequestlaravelproxypackagemanagerforwarder

### Embed Badge

![Health badge](/badges/digitalcloud-laravel-forwarder/health.svg)

```
[![Health](https://phpackages.com/badges/digitalcloud-laravel-forwarder/health.svg)](https://phpackages.com/packages/digitalcloud-laravel-forwarder)
```

###  Alternatives

[nette/http

🌐 Nette Http: abstraction for HTTP request, response and session. Provides careful data sanitization and utility for URL and cookies manipulation.

48619.2M541](/packages/nette-http)[hamburgscleanest/guzzle-advanced-throttle

A Guzzle middleware that can throttle requests according to (multiple) defined rules. It is also possible to define a caching strategy, e.g. get response from cache when rate limit is exceeded or always get cached value to spare your rate limits.

13033.4k1](/packages/hamburgscleanest-guzzle-advanced-throttle)[bmatovu/laravel-xml

Laravel XML Support

91270.4k](/packages/bmatovu-laravel-xml)[hamburgscleanest/laravel-guzzle-throttle

A Laravel wrapper for https://github.com/hamburgscleanest/guzzle-advanced-throttle.

7914.3k](/packages/hamburgscleanest-laravel-guzzle-throttle)[behamin/service-proxy

for proxy or sending requests to other services with useful utilities

102.2k](/packages/behamin-service-proxy)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
