view = $view; $this->repository = $repository; } /** * Returns a listing of nodes on the system. * * @return \Illuminate\Contracts\View\View */ public function index(Request $request) { $nodes = QueryBuilder::for( Node::query()->with('location')->withCount('servers') ) ->allowedFilters(['uuid', 'name']) ->allowedSorts(['id']) ->paginate(25); return $this->view->make('admin.nodes.index', ['nodes' => $nodes]); } }