fix dashboard and apis
PHP Tests / php-tests (push) Failing after 9m1s

This commit is contained in:
Nyan Lin Paing
2026-08-16 23:50:39 +07:00
parent 60413bdebf
commit 8d74ac74cd
26 changed files with 638 additions and 55 deletions
@@ -25,9 +25,10 @@ class EvRouteController extends Controller
public function index(Request $request): AnonymousResourceCollection
{
$filters = $request->only(['company', 'from', 'to', 'date']);
$page = $request->integer('page', 1);
$routes = Cache::tags(self::CACHE_TAG)->remember(
'routes:index:'.md5(json_encode($filters)),
'routes:index:'.md5(json_encode($filters + ['page' => $page])),
now()->addMinutes(self::CACHE_TTL_MINUTES),
fn () => EvRoute::query()
->where('is_active', true)
@@ -37,7 +38,7 @@ class EvRouteController extends Controller
// `date` is accepted for forward-compatibility with future per-date capacity
// checks (domain.md §7), but v1 has no route-level calendar to filter against.
->with(self::EAGER_LOADS)
->get(),
->paginate(),
);
return EvRouteResource::collection($routes);