Request Path & Method: Retrieving The Request Method

Retrieving The Request Method

$method = $request->method();

if ($request->isMethod('post')) {
    //
}

The method method will return the HTTP verb for the request.

Related concepts

Request Path & Method: Retrieving The Request Method — Structure map

Clickable & Draggable!

Request Path & Method: Retrieving The Request Method — Related pages: