novius/laravel-nova-redirect-manager

This package provides an interface to manage redirects with Nova

v0.2.0 2020-02-07 11:23 UTC

This package is not auto-updated.

Last update: 2021-11-26 20:27:54 UTC


README

Travis Packagist Release Licence

This package provides a Nova Tool to manage redirects with spatie/laravel-missing-page-redirector.

Requirements

  • PHP >= 7.2
  • Laravel Nova >= 2.0
  • Laravel Framework >= 5.7

Installation

You can install the package via composer:

composer require novius/laravel-nova-redirect-manager

The package will automatically register itself.

Next, launch migrations :

php artisan migrate

Next, you must register the Spatie\MissingPageRedirector\RedirectsMissingPages middleware :

//app/Http/Kernel.php

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

Next, register the Tool in NovaServiceProvider class :

//app/Providers/NovaServiceProvider.php

public function tools()
{
    return [
        ...,
        new LaravelNovaRedirectManager(),
    ];
}

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\LaravelNovaRedirectManager\RedirectManagerServiceProvider" --tag=config

You can also publish the migrations, lang and views :

php artisan vendor:publish --provider="Novius\LaravelNovaRedirectManager\RedirectManagerServiceProvider" --tag=migrations
php artisan vendor:publish --provider="Novius\LaravelNovaRedirectManager\RedirectManagerServiceProvider" --tag=lang
php artisan vendor:publish --provider="Novius\LaravelNovaRedirectManager\RedirectManagerServiceProvider" --tag=views

Lint

Run php-cs with:

composer run-script lint

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.