Support the ongoing development of Laravel.io →
posted 9 years ago
Requests

Hello Geek,

I'm currently working on a small API using Lumen. However, I'm having some difficulties about the getting the Request on update method (PUT routes). When I tried to return the Request using $request->all() it's empty.

**

public function update($role_id, Request $request) {
    $role = Role::findOrFail($id);
    $role->name = $request->input('name');
    $role->description = $request->input('description');
    $role->save();
}

On the other hand, the store method is working find and I was able to extract the Request inputs

Thanks for your help

Last updated 3 years ago.
0

Sign in to participate in this thread!

Eventy

Your banner here too?

pmventura pmventura Joined 5 Mar 2014

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2025 Laravel.io - All rights reserved.