Fix RolesContainer, refactor NestsContainer

This commit is contained in:
Matthew Penner 2021-01-03 16:25:32 -07:00
parent ce40194147
commit b1d30c1bde
8 changed files with 74 additions and 107 deletions

View file

@ -37,7 +37,7 @@ class NestController extends ApplicationApiController
*/
public function index(GetNestsRequest $request): array
{
$nests = $this->repository->paginated(1);
$nests = $this->repository->paginated(10);
return $this->fractal->collection($nests)
->transformWith($this->getTransformer(NestTransformer::class))

View file

@ -28,7 +28,8 @@ class NestRepository extends EloquentRepository implements NestRepositoryInterfa
/**
* Return a nest or all nests with their associated eggs and variables.
*
* @param int $id
* @param int|null $id
*
* @return \Illuminate\Database\Eloquent\Collection|\Pterodactyl\Models\Nest
*
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException