PHP code example of kmlpandey77 / laravel-redirection
1. Go to this page and download the library: Download kmlpandey77/laravel-redirection 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/ */
kmlpandey77 / laravel-redirection example snippets
// app/Http/Kernel.php
protected $middleware = [
...
\Kmlpandey77\Redirection\Http\Middleware\Redirector::class,
];
return [
/**
* By defult route is `admin`
*
*/
'prefix' => 'admin',
/**
* Defining middleware for route
*/
'middleware' => [
'web',
// 'auth' // or admin
],
/**
*
*/
'route_link' => 'redirects'
];