novius / laravel-backpack-redirection-manager
This packages provides an interface to manage redirections via the Backpack admin panel
Installs: 2 058
Dependents: 0
Suggesters: 0
Security: 0
Stars: 6
Watchers: 2
Forks: 5
Open Issues: 0
Requires
- php: >=7.3
- backpack/crud: ~3.4.0
- spatie/laravel-missing-page-redirector: ~2.4.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ~2.16.0
- orchestra/testbench: ~3.5
- phpunit/phpunit: ~6
README
This package provides an admin panel to manage redirections with spatie/laravel-missing-page-redirector.
Installation
You can install the package via composer:
composer require novius/laravel-backpack-redirection-manager
The package will automatically register itself.
Next you must register the Spatie\MissingPageRedirector\RedirectsMissingPages
middleware :
//app/Http/Kernel.php protected $middleware = [ ... \Spatie\MissingPageRedirector\RedirectsMissingPages::class, ],
Finally you can add a link in the Backpack sidebar :
<li>
<a href="{{ route('crud.redirection.index') }}">
<i class="fa fa-arrows-h"></i>
<span>{{ trans('backpack-redirection-manager::crud.sidebar_title') }}</span>
</a>
</li>
Configuration
This package provides a configuration file whose values overwrite the configuration of spatie/laravel-missing-page-redirector
.
You can publish the configuration file if you want to change these values :
php artisan vendor:publish --provider="Novius\Backpack\RedirectionManager\RedirectionManagerServiceProvider" --tag=config
You can also publish the migrations, lang and routes :
php artisan vendor:publish --provider="Novius\Backpack\RedirectionManager\RedirectionManagerServiceProvider" --tag=migrations
php artisan vendor:publish --provider="Novius\Backpack\RedirectionManager\RedirectionManagerServiceProvider" --tag=lang
php artisan vendor:publish --provider="Novius\Backpack\RedirectionManager\RedirectionManagerServiceProvider" --tag=routes
Lint
Run php-cs with:
./cs.sh
Contributing
Contributions are welcome! Leave an issue on Github, or create a Pull Request.
Licence
This package is under GNU Affero General Public License v3 or (at your option) any later version.