fix item delete endpoint

This commit is contained in:
j3d1 2019-12-19 22:15:42 +01:00
parent dcc9e87dad
commit ecc1b28801

View file

@ -61,7 +61,7 @@ class ItemController extends Controller
public function delete($event, $id) public function delete($event, $id)
{ {
$eid = Event::where('slug','=',$event)->first()->eid; $eid = Event::where('slug','=',$event)->first()->eid;
Item::findOrFail($id)->delete(); Item::where('eid', $eid)->where('item_uid', $id)->first()->delete();
return response()->json(array("satus"=>'Deleted Successfully'), 200); return response()->json(array("satus"=>'Deleted Successfully'), 200);
} }
} }