PHP code example of moon / fakemiddleware
1. Go to this page and download the library: Download moon/fakemiddleware 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/ */
moon / fakemiddleware example snippets
use Moon\FakeMiddleware\FakeMiddleware;
public function createApplication()
{
$app = ve ExternalOAuthVerifier and repalce auth middleware
// with a fake middleware
// function __construct(Application $app, $globalMiddlewares, $routeMiddlewares);
new FakeMiddleware($app, ['App\Http\Middleware\ExternalOAuthVerifier'], ['auth']);
return $app;
}