Example #1
0
 /**
  * List all Node Allocations
  *
  * Returns a listing of all allocations for every node.
  *
  * @Get("/nodes/allocations")
  * @Versions({"v1"})
  * @Response(200)
  */
 public function allocations(Request $request)
 {
     $allocations = Models\Allocation::paginate(100);
     if ($allocations->count() < 1) {
         throw new NotFoundHttpException('No allocations have been created.');
     }
     return $this->response->paginator($allocations, new AllocationTransformer());
 }