0

I want to check if the resource exists or not for that I am supposed to use head method. I gave route something like this

Route::head('abc/{id}', 'def@ghi');

but it gives me 500 internal server errors without any errors.

Dilip Hirapara
  • 14,810
  • 3
  • 27
  • 49

1 Answers1

0

head isn't a method available on the Router, Illuminate\Routing\Router.

All the get routes you make are also setup for head.

/**
 * Register a new GET route with the router.
 *
 * @param  string  $uri
 * @param  \Closure|array|string|callable|null  $action
 * @return \Illuminate\Routing\Route
 */
public function get($uri, $action = null)
{
    return $this->addRoute(['GET', 'HEAD'], $uri, $action);
}
lagbox
  • 48,571
  • 8
  • 72
  • 83