I write a simple post method Route in api.php and postman errored
I also add put Accept = Application/json in headers and return a value to a
but postman do not work
this is postman error
and this is my api.php
Route::post('/p', function (Request $request) {
$a = $request->a;
return response(a,200);
});
Thanks
Route::post('/p', function (Request $request) {
$a = $request->a;
return response($a, 200);
});
You missed the '$' in response($a, 200)
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.