From 1d7c833b7c9be47d3bfd48824760fc27c7ae861d Mon Sep 17 00:00:00 2001 From: ayntk-ai <122374094+ayntk-ai@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:13:03 +0200 Subject: [PATCH] fix sort alphabetically --- app/Livewire/Project/Shared/EnvironmentVariable/All.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Livewire/Project/Shared/EnvironmentVariable/All.php b/app/Livewire/Project/Shared/EnvironmentVariable/All.php index 2c90427c0..10497bd0c 100644 --- a/app/Livewire/Project/Shared/EnvironmentVariable/All.php +++ b/app/Livewire/Project/Shared/EnvironmentVariable/All.php @@ -41,8 +41,8 @@ class All extends Component { if ($this->resourceClass === 'App\Models\Application' && data_get($this->resource, 'build_pack') !== 'dockercompose') { $sortBy = $this->resource->settings->is_env_sorting_enabled ? 'key' : 'id'; - $this->resource->environment_variables = $this->resource->environment_variables->sortBy($sortBy); - $this->resource->environment_variables_preview = $this->resource->environment_variables_preview->sortBy($sortBy); + $this->resource->environment_variables = $this->resource->environment_variables->sortBy($sortBy, SORT_NATURAL|SORT_FLAG_CASE); + $this->resource->environment_variables_preview = $this->resource->environment_variables_preview->sortBy($sortBy, SORT_NATURAL|SORT_FLAG_CASE); } $this->getDevView(); }