Laravel documentation says I can use
$method = Request::method();
to get request method (POST, GET, etc.), but it throws "Call to undefined method Illuminate\Http\Request::method()"
Looking at Illuminate\Http\Request there is no method() function, but SymfonyRequest, that Laravel's Request extends, has getMethod() function, so this works just fine:
$method = Request::getMethod();
Questions:
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community