Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Elkomy's avatar

using put route with update method on lumen

Please I need help I use put route on lumen to update user but put update method does not work as I can not receive any data on it through a put route

0 likes
3 replies
Elkomy's avatar

@Sergiu17 this is the route $router->put('update/{id}','DeviceController@update'); and this is the update method

public function update(Request $request,$id){ $this->validate($request,[ 'name'=>['required',Rule::unique('departments','name')->ignore($id,'id')] ]); $department = Department::find($id); $department->name = $request->name; $department->save(); return response($department); }

Please or to participate in this conversation.