/** * Throw a method not allowed HTTP exception. * * @param array $others * @return void * * @throws \Symfony\Component\HttpKernel\Exception\MethodNotAllowedHttpException */ protected function methodNotAllowed(array $others) { throw new MethodNotAllowedHttpException($others); } /** * Get routes from the collection by method. * * @param string|null $method * @return array */ public function get($method = null) { return is_null($method) ? $this->getRoutes() : Arr::get($this->routes, $method, []); } /** * Determine if the route collection contains a given named route.