PHP code example of icyboy / swmen
1. Go to this page and download the library: Download icyboy/swmen 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/ */
icyboy / swmen example snippets
/**
* Created by PhpStorm.
* User: Icyboy <[email protected]>
* Date: 2016/5/19
* Time: 11:07
*/
namespace App;
class Application extends \Laravel\Lumen\Application
{
public function getMiddleware()
{
return $this->middleware;
}
public function callTerminableMiddleware($response)
{
parent::callTerminableMiddleware($response);
}
}
//替换如下内容
//$app = new Laravel\Lumen\Application(
// realpath(__DIR__.'/../')
//);
$app = new App\Application(
realpath(__DIR__.'/../')
);