From 3758ff05cd3d2745250b190cf3fab337454b9788 Mon Sep 17 00:00:00 2001 From: jedi Date: Thu, 5 Dec 2019 13:09:25 +0100 Subject: [PATCH] select only useful columns --- app/Http/Controllers/ItemController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/Http/Controllers/ItemController.php b/app/Http/Controllers/ItemController.php index 2b4ad96..2a38fc2 100644 --- a/app/Http/Controllers/ItemController.php +++ b/app/Http/Controllers/ItemController.php @@ -18,8 +18,9 @@ class ItemController extends Controller { $eid = Event::where('slug','=',$event)->first()->eid; return response()->json(Item::where('eid','=',$eid) - ->join('containers','items.cid','=','container.cid') + ->join('containers','items.cid','=','containers.cid') ->leftJoin('files','items.iid','=','files.iid') + ->select('items.*','files.hash as file', 'containers.name as container') ->get()); }