Autoformat lol

This commit is contained in:
James Cole
2026-01-23 15:09:50 +01:00
parent ae1347c550
commit 8f15a32bd6
1071 changed files with 21111 additions and 21687 deletions

View File

@@ -43,31 +43,22 @@ class IndexController extends Controller
public function __construct()
{
parent::__construct();
$this->middleware(
function ($request, $next) {
$this->repository = app(UserGroupRepositoryInterface::class);
$this->middleware(function ($request, $next) {
$this->repository = app(UserGroupRepositoryInterface::class);
return $next($request);
}
);
return $next($request);
});
}
public function index(PaginationRequest $request): JsonResponse
{
$administrations = $this->repository->get();
[
'page' => $page,
'limit' => $limit,
'offset' => $offset,
] = $request->attributes->all();
['page' => $page, 'limit' => $limit, 'offset' => $offset] = $request->attributes->all();
$count = $administrations->count();
$administrations = $administrations->slice($offset, $limit);
$paginator = new LengthAwarePaginator($administrations, $count, $limit, $page);
$transformer = new UserGroupTransformer();
return response()
->json($this->jsonApiList(self::RESOURCE_KEY, $paginator, $transformer))
->header('Content-Type', self::CONTENT_TYPE)
;
return response()->json($this->jsonApiList(self::RESOURCE_KEY, $paginator, $transformer))->header('Content-Type', self::CONTENT_TYPE);
}
}