How-to articles, tricks, and solutions about REQUEST

Create a Laravel Request object on the fly

In Laravel, you can create a Request object on the fly by using the create method of the Request facade.

Detecting request type in PHP (GET, POST, PUT or DELETE)

In PHP, you can use the $_SERVER['REQUEST_METHOD'] superglobal to detect the request type.

Doing HTTP requests FROM Laravel to an external API

To make an HTTP request from Laravel to an external API, you can use the HTTP client of your choice.

Getting all request parameters in Symfony 2

In Symfony 2, you can use the $request->request object to get all request parameters.

PHP CURL DELETE request

To send a DELETE request with PHP using cURL, you can use the following code: