diff --git a/src/Illuminate/Routing/Router.php b/src/Illuminate/Routing/Router.php index 2a8051e9a366..8e01a2bd5f83 100644 --- a/src/Illuminate/Routing/Router.php +++ b/src/Illuminate/Routing/Router.php @@ -132,6 +132,18 @@ public function __construct(Dispatcher $events, Container $container = null) $this->container = $container ?: new Container; } + /** + * Register a new HEAD route with the router. + * + * @param string $uri + * @param \Closure|array|string|callable|null $action + * @return \Illuminate\Routing\Route + */ + public function head($uri, $action = null) + { + return $this->addRoute('HEAD', $uri, $action); + } + /** * Register a new GET route with the router. * diff --git a/src/Illuminate/Support/Facades/Route.php b/src/Illuminate/Support/Facades/Route.php index df1d0cfb92e0..351d831658cc 100755 --- a/src/Illuminate/Support/Facades/Route.php +++ b/src/Illuminate/Support/Facades/Route.php @@ -4,6 +4,7 @@ /** * @method static \Illuminate\Routing\Route get(string $uri, \Closure|array|string|callable|null $action = null) + * @method static \Illuminate\Routing\Route head(string $uri, \Closure|array|string|callable|null $action = null) * @method static \Illuminate\Routing\Route post(string $uri, \Closure|array|string|callable|null $action = null) * @method static \Illuminate\Routing\Route put(string $uri, \Closure|array|string|callable|null $action = null) * @method static \Illuminate\Routing\Route delete(string $uri, \Closure|array|string|callable|null $action = null)