コード例 #1
0
ファイル: DispatchRequest.php プロジェクト: Mosaic/Mosaic
 /**
  * Dispatch the request
  *
  * @param Request $request
  *
  * @return Response
  */
 public function __invoke(Request $request)
 {
     $route = $this->dispatcher->dispatch($request, $this->router->all());
     if ($this->closure->isSatisfiedBy($route)) {
         $response = $this->closure->dispatch($route);
     } else {
         $response = $this->controller->dispatch($route);
     }
     return $this->factory->make($response);
 }
コード例 #2
0
ファイル: HomeRoute.php プロジェクト: Mosaic/app-skeleton
 /**
  * Bind routes to router
  *
  * @param Router $router
  */
 public function bind(Router $router)
 {
     $router->get('/', 'App\\Http\\Controllers\\HomeController@index');
 }
コード例 #3
0
ファイル: StubRouteBinder.php プロジェクト: Mosaic/Mosaic
 /**
  * Bind routes to router
  *
  * @param Router $router
  */
 public function bind(Router $router)
 {
     $router->get('/', 'Controller@method');
 }