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 2mo 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 59% 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

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

[prologue/alerts

Prologue Alerts is a package that handles global site messages.

3486.1M30](/packages/prologue-alerts)[laragear/two-factor

On-premises 2FA Authentication for out-of-the-box.

339785.3k8](/packages/laragear-two-factor)[auth0/login

Auth0 Laravel SDK. Straight-forward and tested methods for implementing authentication, and accessing Auth0's Management API endpoints.

2745.0M3](/packages/auth0-login)[alajusticia/laravel-logins

Session management in Laravel apps, user notifications on new access, support for multiple separate remember tokens, IP geolocation, User-Agent parser

2011.0k](/packages/alajusticia-laravel-logins)[maize-tech/laravel-magic-login

Laravel Magic Login

1808.1k](/packages/maize-tech-laravel-magic-login)[mad-web/laravel-social-auth

Easy social auth integration with a lot of available providers

516.7k](/packages/mad-web-laravel-social-auth)

PHPackages © 2026

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