Category : postman

Laravel API is not accepting JSON request. If I request as form-data it works but if I post JSON object in postman body then it does not receive the request data. Route: $router->group([‘prefix’ => ‘imp’], function () use ($router) { $router->group([‘prefix’ => ‘lead’], function () use ($router) { $router->post(‘/jardy’, ‘[email protected]’); }); }); Controller: public function ..

Read more

I have my code below that checks "if the email has already taken" public function test(Request $request) { $request->validate([ ’email’ => ‘required|email|exists:contacts,email’ ]); // … return response()->json([‘done!’], 200); } When I tried this in Postman, I intentionally send invalid email. But the Postman returned an error. Error: Exceeded maxRedirects. Probably stuck in a redirect loop ..

Read more

I want to make a request to verify people’s ID using laravel. Since it’s very credential, I want to make it available only if they verify it from their mobiles. So it must be prevented that the IDs are verified from postman request. Is there a way to detect that a request is sent from ..

Read more

I’m using postman to try and make an API post request: http://127.0.0.1:8000/api/auth/register?name=corbin&[email protected]&password=password There must be a database connecting because I can migrate my db just fine. Using php artisan tinker I can also add a new user just fine: >>> $user = new User(); => AppUser {#3060} >>> $user->name = “kyle”; => “kyle” >>> $user->email ..

Read more

This is my update function, I’m using postman to test the api, My url goes: http://localhost:8000/api/userregister/25 25 is the ID of the user I’m trying to update. I’m sending a PUT request I get this response: IlluminateDatabaseQueryException: SQLSTATE[23000]: Integrity constraint violation: 1048 Column ‘name’ cannot be null (SQL: update `users` set `name` = ?, `email` ..

Read more