PHP code example of fuelviews / laravel-redirect-if-not-found

1. Go to this page and download the library: Download fuelviews/laravel-redirect-if-not-found 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/ */

    

fuelviews / laravel-redirect-if-not-found example snippets


return [
    'fallback_route' => 'home',
];


->withMiddleware(function (Middleware $middleware) {
    $middleware->use([
        \Fuelviews\AppRedirectIfNotFound\Middleware\AppRedirectIfNotFoundMiddleware::class,
    ]);
})

protected $middleware = [
    \App\Http\Middleware\RedirectIfNotFound::class,
];