mercredi 9 juin 2021

record modification date of a value - laravel

i need to create a function that records the date a field was updated.

Right now I have the code to update, but I don't know how to register a change and save a date

I thought to use Carbon :: now (), but how do I save the value in a table?

  public function update(Request $request, $id){
    
    $nuevoIngreso = \App\Models\Registro::find($id);
    $nuevoIngreso->anticipo = $request->anticipo;
    $nuevoIngreso->save();
    return redirect('sistema')->with('mensaje', 'Ficha Actualizada.');

}


from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/3pHPL4P
via IFTTT

Aucun commentaire:

Enregistrer un commentaire