diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 37e8246..2b4ad96 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -18,14 +18,14 @@ class ItemController extends Controller { $eid = Event::where('slug','=',$event)->first()->eid; return response()->json(Item::where('eid','=',$eid) - ->join('containers','item.cid','=','container.cid') - ->leftJoin('files','item.iid','=','files.iid') + ->join('containers','items.cid','=','container.cid') + ->leftJoin('files','items.iid','=','files.iid') ->get()); } public function searchByEvent($event, $query) { - return showByEvent($event); //TODO actually search + return $this->showByEvent($event); //TODO actually search } public function showOneItem($event, $id)