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 6mo 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 3w ago

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

35

—

LowBetter than 77% of packages

Maintenance46

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

3054d 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

[livewire/livewire

A front-end framework for Laravel.

23.6k89.0M2.6k](/packages/livewire-livewire)[barryvdh/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k133.0M734](/packages/barryvdh-laravel-debugbar)[fruitcake/laravel-debugbar

PHP Debugbar integration for Laravel

19.3k2.3M60](/packages/fruitcake-laravel-debugbar)[laravel/boost

Laravel Boost accelerates AI-assisted development by providing the essential context and structure that AI needs to generate high-quality, Laravel-specific code.

3.5k21.5M559](/packages/laravel-boost)[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[laravel/mcp

Rapidly build MCP servers for your Laravel applications.

77022.3M145](/packages/laravel-mcp)

PHPackages © 2026

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