Ejemplo n.º 1
0
 /**
  * Get a route (if necessary) that responds when other available methods are present.
  *
  * @param  \Nova\Http\Request  $request
  * @param  array  $others
  * @return \Nova\Routing\Route
  *
  * @throws \Symfony\Component\Routing\Exception\MethodNotAllowedHttpException
  */
 protected function getOtherMethodsRoute($request, array $others)
 {
     if ($request->method() == 'OPTIONS') {
         return (new Route('OPTIONS', $request->path(), function () use($others) {
             return new Response('', 200, array('Allow' => implode(',', $others)));
         }))->bind($request);
     }
     $this->methodNotAllowed($others);
 }