How do I update my Extratos
table each time I edit the value in the input text.
In update Users I have Input text field and I would like each time to enter a numeric value also update in the Extratos
table only the descricao
and date, but only if there was a checkbox selected.
This update form go to table users
I need the insert that goes to this table extratos
I'm sorry I'm new to programming and I really need your help
<form action="/role-register-update/{{ $users->id }}" method="POST">
<div class="form-group">
<label>Profit Division 5º Investment(week)</label>
<input type="text" name="dindin9" value="{{ $users->dindin9 }}" class="form-control">
</div>
<button type="submit" class="btn btn-success">Save</button>
</form>
public function registerupdate(Request $request, $id)
{
$users = User::find($id);
$users->dindin9 = $request->input('dindin9');
$users->update();
return redirect('/role-register')->with('status', 'User updated');
}
Route::put('/role-register-update/{id}','Admin\AdmDashboardController@registerupdate');
Route::get('/role-register','Admin\AdmDashboardController@registered');