select only useful columns
This commit is contained in:
parent
7e05999e64
commit
3758ff05cd
1 changed files with 2 additions and 1 deletions
|
@ -18,8 +18,9 @@ class ItemController extends Controller
|
||||||
{
|
{
|
||||||
$eid = Event::where('slug','=',$event)->first()->eid;
|
$eid = Event::where('slug','=',$event)->first()->eid;
|
||||||
return response()->json(Item::where('eid','=',$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')
|
->leftJoin('files','items.iid','=','files.iid')
|
||||||
|
->select('items.*','files.hash as file', 'containers.name as container')
|
||||||
->get());
|
->get());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue