also return container and file information through items endpoint
This commit is contained in:
parent
b978b2bc0b
commit
6f7dbddf92
1 changed files with 5 additions and 3 deletions
|
@ -17,13 +17,15 @@ class ItemController extends Controller
|
|||
public function showByEvent($event)
|
||||
{
|
||||
$eid = Event::where('slug','=',$event)->first()->eid;
|
||||
return response()->json(Item::where('eid','=',$eid)->get());
|
||||
return response()->json(Item::where('eid','=',$eid)
|
||||
->join('containers','item.cid','=','container.cid')
|
||||
->leftJoin('files','item.iid','=','files.iid')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function searchByEvent($event, $query)
|
||||
{
|
||||
$eid = Event::where('slug','=',$event)->first()->eid;
|
||||
return response()->json(Item::where('eid','=',$eid)->get()); //TODO actually search
|
||||
return showByEvent($event); //TODO actually search
|
||||
}
|
||||
|
||||
public function showOneItem($event, $id)
|
||||
|
|
Loading…
Reference in a new issue