mirror of
https://github.com/MrUnknownDE/panel.git
synced 2026-04-19 23:03:45 +02:00
Update repository base code to be cleaner and make use of PHP 7 features
This commit is contained in:
@@ -96,7 +96,7 @@ class EggUpdateImporterService
|
||||
});
|
||||
|
||||
$imported = collect($parsed->variables)->pluck('env_variable')->toArray();
|
||||
$existing = $this->variableRepository->withColumns(['id', 'env_variable'])->findWhere([['egg_id', '=', $egg]]);
|
||||
$existing = $this->variableRepository->setColumns(['id', 'env_variable'])->findWhere([['egg_id', '=', $egg]]);
|
||||
|
||||
// Delete variables not present in the import.
|
||||
collect($existing)->each(function ($variable) use ($egg, $imported) {
|
||||
|
||||
@@ -49,7 +49,7 @@ class VariableUpdateService
|
||||
]));
|
||||
}
|
||||
|
||||
$search = $this->repository->withColumns('id')->findCountWhere([
|
||||
$search = $this->repository->setColumns('id')->findCountWhere([
|
||||
['env_variable', '=', array_get($data, 'env_variable')],
|
||||
['egg_id', '=', $variable->egg_id],
|
||||
['id', '!=', $variable->id],
|
||||
|
||||
Reference in New Issue
Block a user