I have a classic create() function to create elements, but changes I wish to save in a separate table, like history. There is table: element_changes and also model created named ElementChange, but in my ElementController, how can I tell to save it in a separate table?
Classic create function:
public function create(Request $request)
$item = new Item();
$item->fill($request->old());
return view('items.create', compact('item'));
}
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire