PHPackages                             maxweb/save-url - 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. [Authentication &amp; Authorization](/categories/authentication)
4. /
5. maxweb/save-url

ActiveLibrary[Authentication &amp; Authorization](/categories/authentication)

maxweb/save-url
===============

Laravel 5 package to redirect users to the last visited page on login.

v1.0.4(8y ago)042MITPHP

Since Dec 31Pushed 8y agoCompare

[ Source](https://github.com/mxrxdxn/save-url)[ Packagist](https://packagist.org/packages/maxweb/save-url)[ RSS](/packages/maxweb-save-url/feed)WikiDiscussions master Synced 4w ago

READMEChangelog (2)Dependencies (6)Versions (8)Used By (0)

Laravel 5: Save-URL
===================

[](#laravel-5-save-url)

Introduction
------------

[](#introduction)

This package allows you to easily redirect users to the last visited page on login.

Laravel compatibility
---------------------

[](#laravel-compatibility)

Laraveltranslation5.1.x1.0.x5.2.x1.0.1 and up5.3.x1.0.2 and up5.4.x1.0.3 and up5.5.x1.0.4 and upInstallation
------------

[](#installation)

Require through composer

```
composer require maxweb/save-url 1.0.x

```

Or manually edit your composer.json file:

```
"require": {
	"maxweb/save-url": "1.0.x"
}

```

Publish the configuration file:

```
php artisan vendor:publish

```

This package supports Laravel 5.5's automatic package discovery feature, so there is no need to add anything to `config/app.php` in Laravel 5.5 and above.

Usage
-----

[](#usage)

### Cached urls

[](#cached-urls)

By default, the last visited URL visited by a user is saved in Session. URLs must follow these criteria to be saved:

```
- Only GET requests are saved.
- AJAX requests are not saved.
- If the user is logged in, no urls are saved.

```

### Excluding urls from the cache

[](#excluding-urls-from-the-cache)

If you want to exclude certain urls from the url cache, like for example the login and signup pages, you may use the provided "doNotSave" middleware:

```
// routes/web.php

Route::get('/login', ['middleware' => 'doNotSave', 'uses' => 'AuthController@login']);
```

### Redirecting after login

[](#redirecting-after-login)

To redirect the user to the last saved url, such as after authentication, you may use:

```
public function login() {
	/** Auth user **/
	if ($success) {
		redirect()->toSavedUrl();
	}
}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~153 days

Total

5

Last Release

3223d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/3aa2d5eabe1f8e815969f9b49fb0f62bf977374524c8cb797066f85a7d2f9811?d=identicon)[maxweb](/maintainers/maxweb)

---

Top Contributors

[![sildraug](https://avatars.githubusercontent.com/u/767887?v=4)](https://github.com/sildraug "sildraug (3 commits)")

---

Tags

laravelloginsave-urlredirect after loginmaxweb

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/maxweb-save-url/health.svg)

```
[![Health](https://phpackages.com/badges/maxweb-save-url/health.svg)](https://phpackages.com/packages/maxweb-save-url)
```

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M345](/packages/psalm-plugin-laravel)[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)[propaganistas/laravel-disposable-email

Disposable email validator

6023.0M7](/packages/propaganistas-laravel-disposable-email)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k15.1M129](/packages/laravel-pulse)[directorytree/ldaprecord-laravel

LDAP Authentication &amp; Management for Laravel.

5752.3M18](/packages/directorytree-ldaprecord-laravel)

PHPackages © 2026

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