You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The input form data is missing when tried to access from request in update of an api controller. However, the same thing does work perfectly fine inside a store method.
I've tried looking online and found no one mentioned this issue before.
Steps To Reproduce
Create new project
Install sanctum
Create api controller(php artisan make:controller TestController --api)
Simply return the request->all() inside update and store
Create route for that controller in api.php(Route::apiResource('tests', TestController::class))
Send post/put request to the route
See result
Result from POST request to store method
Result from PUT request to update method, "test_data" field should be present as above
The text was updated successfully, but these errors were encountered:
aidilrx04
changed the title
Form Data inputs in update api controller.
Form Data inputs is missing in update api controller.
Feb 24, 2025
Laravel Version
11.31
PHP Version
8.2.12
Database Driver & Version
10.4.32-MariaDB
Description
The input form data is missing when tried to access from request in update of an api controller. However, the same thing does work perfectly fine inside a store method.
I've tried looking online and found no one mentioned this issue before.
Steps To Reproduce
Result from POST request to store method
Result from PUT request to update method, "test_data" field should be present as above

The text was updated successfully, but these errors were encountered: