Update repository base code to be cleaner and make use of PHP 7 features
This commit is contained in:
parent
0ec5a4e08c
commit
60eb60013c
96 changed files with 1048 additions and 1785 deletions
|
@ -114,9 +114,7 @@ class PackController extends Controller
|
|||
public function index(Request $request)
|
||||
{
|
||||
return view('admin.packs.index', [
|
||||
'packs' => $this->repository->search($request->input('query'))->paginateWithEggAndServerCount(
|
||||
$this->config->get('pterodactyl.paginate.admin.packs')
|
||||
),
|
||||
'packs' => $this->repository->setSearchTerm($request->input('query'))->paginateWithEggAndServerCount(),
|
||||
]);
|
||||
}
|
||||
|
||||
|
@ -177,14 +175,14 @@ class PackController extends Controller
|
|||
/**
|
||||
* Display pack view template to user.
|
||||
*
|
||||
* @param int $pack
|
||||
* @param \Pterodactyl\Models\Pack $pack
|
||||
* @return \Illuminate\View\View
|
||||
* @throws \Pterodactyl\Exceptions\Repository\RecordNotFoundException
|
||||
*/
|
||||
public function view($pack)
|
||||
public function view(Pack $pack)
|
||||
{
|
||||
return view('admin.packs.view', [
|
||||
'pack' => $this->repository->getWithServers($pack),
|
||||
'pack' => $this->repository->loadServerData($pack),
|
||||
'nests' => $this->serviceRepository->getWithEggs(),
|
||||
]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue