diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 6455fd2..794b7d8 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -61,7 +61,7 @@ class ItemController extends Controller public function delete($event, $id) { $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); } }