Reputation: 2797
I am using the Slim framework
to develop my rest API
. I am having problems with the PUT
request. I want to access variables sent from the client on the server side.
$app->put('post/:pid', function ($pid) {
//how to access other data sent from the client?
}
Upvotes: 0
Views: 1757
Reputation: 518
Refer the code below:
$app = \Slim\Slim::getInstance();
$request = $app->request();
$var = $request->put();
The variable is the form of array at $var
Upvotes: 3