Add manifest.json for graphify-out documentation with metadata for various files
This commit is contained in:
@@ -161,7 +161,12 @@ class LocationController extends BaseController
|
||||
$limit = min(100, max(1, (int) $request->query->get('limit', 15)));
|
||||
$search = trim((string) $request->query->get('search', ''));
|
||||
|
||||
$qb = $this->provinceRepo->createQueryBuilder('p')->orderBy('p.weight', 'ASC')->addOrderBy('p.name', 'ASC');
|
||||
$qb = $this->provinceRepo->createQueryBuilder('p');
|
||||
if ($request->query->get('sort') === 'id') {
|
||||
$qb->orderBy('p.id', strtoupper((string) $request->query->get('order')) === 'DESC' ? 'DESC' : 'ASC');
|
||||
} else {
|
||||
$qb->orderBy('p.weight', 'ASC')->addOrderBy('p.name', 'ASC');
|
||||
}
|
||||
if ($search !== '') {
|
||||
$qb->andWhere('p.name LIKE :s')->setParameter('s', '%' . $search . '%');
|
||||
}
|
||||
@@ -188,9 +193,12 @@ class LocationController extends BaseController
|
||||
|
||||
$qb = $this->cityRepo->createQueryBuilder('c')
|
||||
->leftJoin('c.province', 'p')
|
||||
->addSelect('p')
|
||||
->orderBy('c.weight', 'ASC')
|
||||
->addOrderBy('c.name', 'ASC');
|
||||
->addSelect('p');
|
||||
if ($request->query->get('sort') === 'id') {
|
||||
$qb->orderBy('c.id', strtoupper((string) $request->query->get('order')) === 'DESC' ? 'DESC' : 'ASC');
|
||||
} else {
|
||||
$qb->orderBy('c.weight', 'ASC')->addOrderBy('c.name', 'ASC');
|
||||
}
|
||||
|
||||
if ($search !== '') {
|
||||
$qb->andWhere('c.name LIKE :s')->setParameter('s', '%' . $search . '%');
|
||||
|
||||
Reference in New Issue
Block a user