fix uid calculation

This commit is contained in:
j3d1 2019-12-23 22:17:21 +01:00
parent 84353dd356
commit 17e859b9ba

View file

@ -46,7 +46,7 @@ class ItemController extends Controller
public function create($event, Request $request)
{
$eid = Event::where('slug','=',$event)->first()->eid;
$uid = Item::where('eid',$eid)->max('item_uid') + 1;
$uid = Item::withTrashed()->where('eid',$eid)->max('item_uid') + 1;
$newitem = $request->except(['dataImage']);
$newitem['eid'] = "".$eid;
$newitem['item_uid'] = $uid;