Download the PHP package neurony/laravel-redirects without Composer
On this page you can find all versions of the php package neurony/laravel-redirects. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Informations about the package laravel-redirects
Package discontinued! Check out VARBOX.IO instead.
Unfortunately this package is now discontinued.
Please check out Varbox (Laravel Admin Panel) for this functionality and much more.
- Buy: https://varbox.io/buy
- Docs: https://varbox.io/docs
- Demo: https://demo.varbox.test/admin
- Repo https://github.com/VarboxInternational/varbox
Thank you!
Nested redirects for Laravel
- Overview
- Installation
- Usage
Overview
This package allows you to create simple or multiple nested redirects for your Laravel applications.
This package can be useful from an SEO perspective, when in your application, you have URLs that have the potential of being modified.
Example of the dynamic redirecting logic:
-
Let's assume you have an URL called
/original - You create a redirect from
/originalto/modifiedAccessing
/originalwill redirect to/modified - You create another redirect from
/modifiedto/modified-againAccessing
/modifiedwill redirect to/modified-againAND
Accessoing/originalwill redirect to/modified-again - You create another redirect from
/modified-againto/modified-yet-againAccessing
/modified-againwill redirect to/modified-yet-againAND
Accessing/modifiedwill redirect to/modified-yet-againAND
Accessing/originalwill redirect to/modified-yet-again - You create another redirect from
modified-yet-againto/originalAccessing
/modified-yet-againwill redirect to/originalAND
Accessing/modified-againwill redirect to/originalAND
Accessing/modifiedwill redirect to/original
Installation
Install the package via Composer:
Publish the config file with:
Publish the migration file with:
After the migration has been published you can create the redirects table by running:
Usage
Add the middleware
In order for the redirecting functionality to actually happen, you need to add the Neurony\Redirects\Middleware\RedirectRequests middleware.
Go to App\Http\Kernel and add the Neurony\Redirects\Middleware\RedirectRequests middleware in your $middlewareGroups groups of choice.
Creating redirects
You should never use the Neurony\Redirects\Models\Redirect directly, as this is the default concrete implementation for the Neurony\Redirects\Contracts\RedirectModelContract.
Using the Neurony\Redirects\Models\Redirect model class directly will prevent you from being able to extend the model's capabilities.
You can create redirects that will be stored inside the redirects table like this:
To see how you can extend the Neurony\Redirects\Models\Redirect model's capabilities, please read the comments from /config/redirects.php -> redirect_model
Credits
- Andrei Badea
- All Contributors
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.
License
The MIT License (MIT). Please see LICENSE for more information.
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
All versions of laravel-redirects with dependencies
illuminate/contracts Version ^7.0
illuminate/support Version ^7.0
illuminate/database Version ^7.0
