PHPackages                             simexis/laravel-ajax-redirector - 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. simexis/laravel-ajax-redirector

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

simexis/laravel-ajax-redirector
===============================

A Laravel library for handling ajax redirects

3.0.0(8y ago)0844MITPHPPHP &gt;=7.1.3

Since Jul 8Pushed 4mo ago1 watchersCompare

[ Source](https://github.com/jooorooo/laravel-ajax-redirector)[ Packagist](https://packagist.org/packages/simexis/laravel-ajax-redirector)[ RSS](/packages/simexis-laravel-ajax-redirector/feed)WikiDiscussions master Synced yesterday

READMEChangelogDependencies (1)Versions (4)Used By (0)

laravel-ajax-redirector
=======================

[](#laravel-ajax-redirector)

A Laravel library for handling AJAX redirects

This package changes the redirect response for AJAX calls from 301 or 302 to a 278 JSON response. XHR requests follow redirects which in a lot of cases, isn't the intention. In most cases, the intention is for the browser to redirect the client to the intended page.

For **Laravel 4**, please use version 1.0.0.

For **Laravel 5**, please use version 2.0.0+

For **Laravel 5.6**, please use version 3.0.0+

Installation
------------

[](#installation)

```
composer require simexis/laravel-ajax-redirector
```

After updating composer, add the service provider to the `providers` array in `config/app.php` for Laravel version &lt; 5.5.\*

```
'providers' => [
    Superbalist\AjaxRedirector\AjaxRedirectServiceProvider::class,
]
```

Usage
-----

[](#usage)

In your application, you'll continue to do redirects like you always have.

```
return redirect()->to('/test');
```

In javascript, you'll need to watch for AJAX calls which result in HTTP 278 responses and do a client side redirect using eg: window.location.replace(json.redirect\_url);

With jQuery, this can be done using a Global AJAX Event Handler.

With AngularJS, this can be done using a $http interceptor.

The response from the server will look something like:

```
HTTP/1.1 278 unknown status
Content-Type: application/json

{"redirect_url":"http:\/\/your.site.com\/test"}

```

###  Health Score

36

—

LowBetter than 82% of packages

Maintenance50

Moderate activity, may be stable

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity60

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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

Every ~295 days

Total

3

Last Release

3004d ago

Major Versions

1.0.0 → 2.0.02017-07-04

2.0.0 → 3.0.02018-02-20

PHP version history (2 changes)1.0.0PHP &gt;=5.5.0

3.0.0PHP &gt;=7.1.3

### Community

Maintainers

![](https://www.gravatar.com/avatar/b94e45e0fc8056daeec3bc285ca4befdbaf5064a57f29bd9d93a9459afab9a28?d=identicon)[jooorooo](/maintainers/jooorooo)

---

Top Contributors

[![matthewgoslett](https://avatars.githubusercontent.com/u/1571743?v=4)](https://github.com/matthewgoslett "matthewgoslett (6 commits)")[![danijelk](https://avatars.githubusercontent.com/u/580753?v=4)](https://github.com/danijelk "danijelk (1 commits)")[![jooorooo](https://avatars.githubusercontent.com/u/5603141?v=4)](https://github.com/jooorooo "jooorooo (1 commits)")

### Embed Badge

![Health badge](/badges/simexis-laravel-ajax-redirector/health.svg)

```
[![Health](https://phpackages.com/badges/simexis-laravel-ajax-redirector/health.svg)](https://phpackages.com/packages/simexis-laravel-ajax-redirector)
```

###  Alternatives

[omniphx/forrest

A Laravel library for Salesforce

2724.4M8](/packages/omniphx-forrest)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)[fsasvari/laravel-trailing-slash

The package that adds redirection with trailing slash to Laravel framework.

63164.3k](/packages/fsasvari-laravel-trailing-slash)[dragon-code/laravel-http-logger

Logging incoming HTTP requests

319.8k3](/packages/dragon-code-laravel-http-logger)[spinen/laravel-browser-filter

Filters http requests based on browser type.

2146.3k](/packages/spinen-laravel-browser-filter)[noitran/opendox

OpenApi(Swagger) 3.0 package for Lumen 5.5+ and Laravel 5.5+ with REDOC UI and SwaggerUI 3

2313.9k](/packages/noitran-opendox)

PHPackages © 2026

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