fix generation of item_uid
This commit is contained in:
parent
d2d0614640
commit
59c245232b
1 changed files with 2 additions and 1 deletions
|
@ -46,9 +46,10 @@ 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;
|
||||
$newitem = $request->except(['dataImage']);
|
||||
$newitem['eid'] = "".$eid;
|
||||
$newitem['item_uid'] = "".rand(10, 100);
|
||||
$newitem['item_uid'] = $uid;
|
||||
$newitem['wo'] = "";
|
||||
$item = Item::create($newitem);
|
||||
$dataImage = $request->get('dataImage');
|
||||
|
|
Loading…
Reference in a new issue