コード例 #1
0
ファイル: App.php プロジェクト: bogdananton/multi-routing
 /**
  * @param Request $request
  * @return \Illuminate\Http\Response
  */
 public function handle(Request $request)
 {
     try {
         $response = $this->router->dispatch($request);
     } catch (NotFoundHttpException $e) {
         // parse request to return an error according to protocol
         $response = new Response('Page not found', 404);
     } catch (MethodNotAllowedHttpException $e) {
         $response = new Response('Page not found', 404);
     }
     $response->sendHeaders();
     $response->send();
     return $response;
 }