Route::dispatch PHP Method

dispatch() public static method

Dispatch the request to the application.
public static dispatch ( Illuminate\Http\Request $request ) : Illuminate\Http\Response
$request Illuminate\Http\Request
return Illuminate\Http\Response
        public static function dispatch($request)
        {
            return \Illuminate\Routing\Router::dispatch($request);
        }

Usage Example

Exemplo n.º 1
0
 public function bootstrap()
 {
     $this->constant();
     //加载服务配置项
     $servers = (require __DIR__ . '/service.php');
     $config = (require ROOT_PATH . '/system/config/service.php');
     $servers['providers'] = array_merge($config['providers'], $servers['providers']);
     $servers['facades'] = array_merge($config['facades'], $servers['facades']);
     $this->servers = $servers;
     //自动加载系统服务
     Loader::register([$this, 'autoload']);
     //绑定核心服务提供者
     $this->bindServiceProvider();
     //添加初始实例
     $this->instance('App', $this);
     //设置外观类APP属性
     ServiceFacade::setFacadeApplication($this);
     //启动服务
     $this->boot();
     //定义错误/异常处理
     Error::bootstrap();
     //命令行模式
     IS_CLI and die(Cli::bootstrap());
     //导入类库别名
     Loader::addMap(c('app.alias'));
     //自动加载文件
     Loader::autoloadFile();
     //开启会话
     Session::start();
     //执行全局中间件
     Middleware::globals();
     //解析路由
     Route::dispatch();
 }
All Usage Examples Of Route::dispatch