/** * Update the specified resource in storage. * * @param Module $module * @return Response */ public function update($module) { $module->fill(Input::data()); if (Input::data('parent') && ($parent = Module::find(Input::data('parent')['id']))) { $module->parent()->associate($parent); } $module->save(); return $module; }