I have problem with send data from one table to another. I want delete data from first table too. Is it possible to do that operation under one button ? I have my records in table. I don't know how to route this operation.
This is my idea,but it didnt work. I get error Invalid route action
public function dodaj($id)
{
$operacje = DB::table('operacja')->where('id',$id)->get();
$operacje = DB::table('potwierdzona')->insert($operacje);
$operacje = Operacja::findorFail($id);
$operacje->delete();
return redirect('patients');
}
My route is Route::post('potwierdzone/$id/dodaj/','PotwierdzonaController');
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire