vendredi 28 octobre 2016

Add element changes in laravel in separate table?

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'));
}



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/2dOuNiU
via IFTTT

Aucun commentaire:

Enregistrer un commentaire