Owl\Http\Controllers\SearchController::jsonResults PHP Метод

jsonResults() приватный Метод

private jsonResults ( $q )
    private function jsonResults($q)
    {
        $items = $this->searchService->itemMatch($q, $this->perPage);
        $json = array();
        foreach ($items as $item) {
            $json[] = ['title' => $item->title, 'url' => '://' . $_SERVER['HTTP_HOST'] . '/items/' . $item->open_item_id];
        }
        return $json;
    }