Download the PHP package hmones/laravel-redirect without Composer
On this page you can find all versions of the php package hmones/laravel-redirect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Table of contents
Download hmones/laravel-redirect
More information about hmones/laravel-redirect
Files in hmones/laravel-redirect
Download hmones/laravel-redirect
More information about hmones/laravel-redirect
Files in hmones/laravel-redirect
Vendor hmones
Package laravel-redirect
Short Description Redirects users automatically after login to the previous protected route they were trying to access
License MIT
Homepage https://github.com/hmones/laravel-redirect
Package laravel-redirect
Short Description Redirects users automatically after login to the previous protected route they were trying to access
License MIT
Homepage https://github.com/hmones/laravel-redirect
Keywords laravelLaravelRedirect
Please rate this library. Is it a good library?
Informations about the package laravel-redirect
Laravel Redirect
This package is a configurable add-on to your laravel application that allows you to do the following:
- Redirect users back to the protected (needs-authorization) page they wanted to visit right after they log-in instead of the default page.
- Redirect users to a particular destination inside or outside your application by providing that link in a url parameter when logging in or on any of your application pages (e.g. https://your-domain.com/login?redirect=https://another-domain.com).
- Configure the redirect parameter, disable it, make it only accept certain regex or change the name of that parameter
- Configure the middleware group used for authentication in case you are not using laravel defaults or want to use the redirect for another middleware group.
Installation
Via Composer
Configuration
To publish the package configuration
The configuration file contains the following parameters:
web_middleware
: the name of your application's web middleware- Env variable:
WEB_MIDDLEWARE
- Default value:
web
- Env variable:
parameter.enabled
whether you would like to enable parameter redirect on your application, once enabled a user can be redirected for example after login given that their login url was as in this example:https://mydomain.com/login?redirect=https://another-url.com
- Env variable:
REDIRECT_PARAMETER_ENABLED
- Default value:
true
- Env variable:
parameter.name
if parameter redirect is enabled, you can customize the query parameter used to capture the redirect link- Env variable:
REDIRECT_PARAMETER
- Default value:
redirect
- Env variable:
parameter.regex
if parameter redirect is enabled, you can add a regex to check the redirect query parameter e.g./^.*mydomain\.com$/
- Env variable:
REDIRECT_REGEX
- Default value:
null
- Env variable:
routes.login
the name of the login route used by your application- Env variable:
LOGIN_ROUTE_NAME
- Default value:
login
- Env variable:
routes.logout
the name of the logout route used by your application- Env variable:
LOGOUT_ROUTE_NAME
- Default value:
logout
- Env variable:
routes.default
the name of the route that the user is redirected to by default after login- Env variable:
DEFAULT_ROUTE_NAME
- Default value:
home
- Env variable:
Usage
- Install the package
- Adjust the configuration parameters in your
.env
file or publish the package configuration file to modify it. - Add the package service provider at the end of the providers array in your app configuration file
config\app.php
Change log
Please see the changelog for more information on what has changed recently.
Testing
Contributing
Please see contributing.md for details and a todolist.
Security
If you discover any security related issues, please email author email instead of using the issue tracker.
Credits
License
Please see the license file for more information.
All versions of laravel-redirect with dependencies
PHP Build Version
Package Version
The package hmones/laravel-redirect contains the following files
Loading the files please wait ....