Remove old Theme::js calls in blade layouts. Persist checkboxes, Server Owner, Node, Default Allocation, and Additional Allocations on servers/new.blade.php
This commit is contained in:
parent
fb96d9468e
commit
b5e50719ac
9 changed files with 209 additions and 73 deletions
|
@ -54,4 +54,22 @@ class UserRepository extends EloquentRepository implements UserRepositoryInterfa
|
|||
return $item;
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Returns a user with the given id in a format that can be used for dropdowns.
|
||||
*
|
||||
* @param int $id
|
||||
* @return \Pterodactyl\Models\Model
|
||||
*/
|
||||
public function filterById(int $id): \Pterodactyl\Models\Model
|
||||
{
|
||||
$this->setColumns([
|
||||
'id', 'email', 'username', 'name_first', 'name_last',
|
||||
]);
|
||||
|
||||
$model = $this->getBuilder()->findOrFail($id, $this->getColumns())->getModel();
|
||||
$model->md5 = md5(strtolower($model->email));
|
||||
|
||||
return $model;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue