PHP code example of appstract / laravel-referer-redirector

1. Go to this page and download the library: Download appstract/laravel-referer-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/ */

    

appstract / laravel-referer-redirector example snippets


Route::get('welcome', function () {
    //
})->middleware('redirect-referer');

Route::group(['middleware' => ['redirect-referer']], function () {
    //
});

protected $middleware = [
    ...

    \Appstract\RefererRedirector\Middleware\RedirectReferer::class,

    ...
];
 bash
php artisan migrate
 bash
php artisan referer:remove {referer}
 bash
php artisan referer:list