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



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire