1. Go to this page and download the library: Download 1970mr/laravel-redirector library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
1970mr / laravel-redirector example snippets
use Mr1970\LaravelRedirector\Middlewares\HandleRedirects;
Route::middleware([HandleRedirects::class])->group(function () {
// Your routes here
});
// Using alias
Route::middleware(['redirector'])->group(function () {
// Your routes here
});
// Using class name
Route::middleware([\Mr1970\LaravelRedirector\Middlewares\HandleRedirects::class])->group(function () {
// Your routes here
});