try yolo search to test api
This commit is contained in:
parent
d321093d0f
commit
e66fcf3e88
1 changed files with 7 additions and 1 deletions
|
@ -26,7 +26,13 @@ class ItemController extends Controller
|
|||
|
||||
public function searchByEvent($event, $query)
|
||||
{
|
||||
return $this->showByEvent($event); //TODO actually search
|
||||
$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 container')
|
||||
->where('items.bezeichnung', 'like' , '%'.base64_decode ( $query , true).'%')
|
||||
->get());
|
||||
}
|
||||
|
||||
public function showOneItem($event, $id)
|
||||
|
|
Loading…
Reference in a new issue