Download the PHP package sirodiaz/laravel-redirection without Composer
On this page you can find all versions of the php package sirodiaz/laravel-redirection. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download sirodiaz/laravel-redirection
More information about sirodiaz/laravel-redirection
Files in sirodiaz/laravel-redirection
Package laravel-redirection
Short Description Laravel package that allows storing in database (or other sources) urls to redirect for SEO purposes
License MIT
Homepage https://github.com/SiroDiaz/laravel-redirection
Informations about the package laravel-redirection
Laravel package for manage your URL redirects in database or other sources to get better SEO results
Requirements
You need PHP 8.0 or higher. It is tested and designed for Laravel 9 and 10. This package will receive updates for future Laravel versions. Previous Laravel versions are not contemplated so use Neurony/laravel-redirects package for older Laravel versions.
Installation
You can install the package via composer:
You can publish and run the migrations with:
You can publish the config file with:
This is the contents of the published config file:
You can change and extend the default SiroDiaz\Redirection\Models\Redirection
model class.
Image that you want to add some methods or fields. You would need to create a new model class, for example App\Models\Redirect
.
Here is a basic example of how to extend the functionality of the default Redirection model. We want to include support for Laravel BackPack admin panel would be:
Finally, you have to vendor:publish the sirodiaz/laravel-redirection
config file to change the model
class used now.
If you want to add more status codes for another type of redirect purposes, add them to your config/redirection.php config file. By default, you have the most common redirections codes: 301, 302 and 307.
Ey! don't forget to append the middleware SiroDiaz\Redirection\RedirectRequests
to your app/Http/Kernel.php
file
Extending and creating new redirect Drivers
TODO
Testing this package for contribution
Changelog
Please see CHANGELOG for more information on what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Credits
- SiroDiaz
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of laravel-redirection with dependencies
illuminate/contracts Version ^9.0|^10.0|^11.0
illuminate/database Version ^9.0|^10.0|^11.0
illuminate/support Version ^9.0|^10.0|^11.0
spatie/laravel-package-tools Version ^1.16