novius/laravel-backpack-redirection-manager

此包提供通过Backpack管理面板管理重定向的接口

1.0.0 2020-05-06 13:52 UTC

This package is auto-updated.

Last update: 2024-09-26 11:21:59 UTC


README

Travis Packagist Release Licence

此包提供了一个管理面板,用于使用 spatie/laravel-missing-page-redirector 进行重定向。

安装

您可以通过Composer安装此包

composer require novius/laravel-backpack-redirection-manager

包将自动注册自己。

接下来,您必须注册 Spatie\MissingPageRedirector\RedirectsMissingPages 中间件

//app/Http/Kernel.php

protected $middleware = [
    ...
    \Spatie\MissingPageRedirector\RedirectsMissingPages::class,
],

最后,您可以在Backpack侧边栏中添加一个链接

<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>

配置

此包提供了一个配置文件,其中的值将覆盖 spatie/laravel-missing-page-redirector 的配置。

如果您想更改这些值,则可以发布配置文件

php artisan vendor:publish --provider="Novius\Backpack\RedirectionManager\RedirectionManagerServiceProvider" --tag=config

您还可以发布迁移、语言和路由

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

代码风格检查

使用php-cs运行

./cs.sh

贡献

欢迎贡献!在Github上提交问题或创建Pull Request。

许可证

此包受 GNU Affero General Public License v3 或(根据您的要求)任何后续版本的约束。