i got the solution i changed the single quotes into double quotes in my json post body it worked for me
Post request Not Working - Lumen
I have tried to log the request object from the post call made with postman
public function store(Request $request) { \LOG::info($request); }
and i get the following log
Accept: / Accept-Encoding: gzip, deflate, br Accept-Language: en-US,en;q=0.8 Cache-Control: no-cache Connection: keep-alive Content-Length: 475 Content-Type: application/json Host: localhost:8003 Origin: chrome-extension:// Postman-Token: 42a2a660-b779-05d1-4fd7- User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3112.113 Safari/537.36
------WebKitFormBoundaryc7vTNl95ddxp5j0y Content-Disposition: form-data; name="name"
dsfsreterter ------WebKitFormBoundaryc7vTNl95ddxp5j0y Content-Disposition: form-data; name="description"
sddfsdfgsdtret ------WebKitFormBoundaryc7vTNl95ddxp5j0y Content-Disposition: form-data; name="category"
sdfsdgbtretetr ------WebKitFormBoundaryc7vTNl95ddxp5j0y Content-Disposition: form-data; name="published_on"
2005-2-2 ------WebKitFormBoundaryc7vTNl95ddxp5j0y--
now how will I access the data i am getting in the post body.
I tried to access these ways it is not working.
\LOG::info($request->input('name')); \LOG::info($request->get('name')); \LOG::info($request->request->get('name')); \LOG::info($request->all()); \LOG::info($request->input('description')); \LOG::info($request->input('category')); \LOG::info($request->input('published_on'));
please help me to access the data form request object
Please or to participate in this conversation.