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.
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.
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);
}