This composer package is a simple UI for saving page redirects to your database.
Begin by pulling in the package through Composer.
composer require malcolmknott/redirector
If using Laravel 5, include the service provider within your config/app.php
file.
'providers' => [
Malcolmknott\Redirector\RedirectorServiceProvider::class,
];
If you have a new project, scaffold the basic login and registration views to pull in Boostrap. Or publish the view files to use your own layout.
php artisan make:auth
Run the migration for the redirects table.
php artisan migrate
Pull in the Spatie Laravel Missing Page Redirector package, follow the install and setup instructions.
Update the "laravel-missing-page-redirector.php" config file with the database redirector class.
'redirector' => \Malcolmknott\Redirector\DatabaseRedirector::class,
Add a route that points to the Redirector Controller, you'll probably want to add some middleware to restrict who can edit your redirects.
Route::resource('redirects', '\Malcolmknott\Redirector\RedirectController');
Publish the view files to change the format and add your own style.
php artisan vendor:publish --provider="Malcolmknott\Redirector\RedirectorServiceProvider" --tag="views"