malcolmknott / redirector
301 Redirects
Installs: 26
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Language:HTML
This package is not auto-updated.
Last update: 2025-02-07 21:14:24 UTC
README
This composer package is a simple UI for saving page redirects to your database.
Installation
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
Laravel Missing Page Redirector
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,
Usage
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');
Views
Publish the view files to change the format and add your own style.
php artisan vendor:publish --provider="Malcolmknott\Redirector\RedirectorServiceProvider" --tag="views"