mdooley47 / laravel-redirect
This package is abandoned and no longer maintained.
No replacement package was suggested.
Extends Laravel's redirect capabilities
v1.0.0
2018-09-01 22:11 UTC
Requires
- illuminate/http: ~5.6
- illuminate/support: ~5.6
- illuminate/validation: ~5.6
- mdooley47/laravel-urlvalidator: ^1.1
This package is not auto-updated.
Last update: 2024-03-31 21:11:07 UTC
README
Important
This project is old and not used anymore. Please use something like ash-jc-allen/short-url instead.
laravel-redirect
Install
You can install the package with composer:
composer require mdooley47/laravel-redirect
How To Use
The purpose of this package is to provide a default targetUrl
when redirecting in Laravel, if the current target does not match the desired url.
Simply call defaultTarget($options, $default)
on the Redirect Facade.
$options
either an array listing the robust validation options provided by mdooley47/laravel-urlvalidator or a string that will use the host
validator provided by mdooley47/laravel-urlvalidator.
\Illuminate\Support\Facades\Redirect::back() ->defaultTarget('match.domain.tld', 'default.domain.tld'); // Returns \Illuminate\Support\Facades\Redirect::getTargetUrl()