1. Go to this page and download the library: Download phpwatch/laravel-fast404 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/ */
class Kernel extends HttpKernel
{
//
protected $middleware = [
\PHPWatch\LaravelFast404\Fast404Middleware::class,
// other middleware
];
// ...
}
// at the top
use PHPWatch\LaravelFast404\Fast404Middleware;
// in register() method:
$this->app->bind(Fast404Middleware::class, static function ($app): Fast404Middleware {
return new Fast404Middleware('Not Found', '/\.(?:js|css|jpg|jpeg|gif|png|webp|ico|exe|bin|dmg|woff|woff2)$/i');
});
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.