diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 34f8dfe..a377fc1 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -21,8 +21,8 @@ class ItemController extends Controller $eid = Event::where('slug','=',$event)->first()->eid; return response()->json(Item::where('eid','=',$eid) ->join('containers','items.cid','=','containers.cid') - ->leftJoin('files','items.iid','=','files.iid') - ->select('items.*','files.hash as file', 'containers.name as box') + ->leftJoin('currentfiles','items.iid','=','currentfiles.iid') + ->select('items.*','currentfiles.hash as file', 'containers.name as box') ->get()); } @@ -32,8 +32,8 @@ class ItemController extends Controller $query_tokens = explode(" ",base64_decode ( $query , true)); $q = Item::where('eid','=',$eid) ->join('containers','items.cid','=','containers.cid') - ->leftJoin('files','items.iid','=','files.iid') - ->select('items.*','files.hash as file', 'containers.name as box'); + ->leftJoin('currentfiles','items.iid','=','currentfiles.iid') + ->select('items.*','currentfiles.hash as file', 'containers.name as box'); foreach ($query_tokens as $token) $q = $q->where('items.description','like','%'.$token.'%'); return response()->json($q->get());