From 856b61da88abe6723faa12889ccfb9bf8e82510a Mon Sep 17 00:00:00 2001 From: E98Developer Date: Sun, 9 Aug 2026 07:15:37 +0200 Subject: [PATCH] MOD change env call to config call in project --- app/Console/Commands/supplierNotifier.php | 2 +- .../Controllers/Admin/PriceListController.php | 12 ++-- resources/views/dashboard.blade.php | 72 +++++++++---------- .../components/speed-button-nav-bar.blade.php | 4 +- routes/web.php | 4 +- 5 files changed, 47 insertions(+), 47 deletions(-) diff --git a/app/Console/Commands/supplierNotifier.php b/app/Console/Commands/supplierNotifier.php index 1fbe842..526944f 100644 --- a/app/Console/Commands/supplierNotifier.php +++ b/app/Console/Commands/supplierNotifier.php @@ -158,7 +158,7 @@ private function sendNotification(int $orderArchiveId) $to[] = $orderData['customNotificationEmail']; } - if (env('APP_STAGE', 'DEV') == 'PROD') { + if (config('app.stage', 'DEV') == 'PROD') { $to[] = $orderData['supplier']['orderEmail']; if ($orderData['supplier']['orderEmail2']) { $to[] = $orderData['supplier']['orderEmail2']; diff --git a/app/Http/Controllers/Admin/PriceListController.php b/app/Http/Controllers/Admin/PriceListController.php index 0068a0c..553947d 100644 --- a/app/Http/Controllers/Admin/PriceListController.php +++ b/app/Http/Controllers/Admin/PriceListController.php @@ -90,13 +90,13 @@ public function index(): View|Response|JsonResponse $m->subject('Árlista változás '); $m->to($emailAddress); /* - if(env('APP_STAGE')=='PROD'){ + if(config('app.stage')=='PROD'){ $m->to($emailAddress); }else{ - if(env('APP_STAGE')=='TEST'){ + if(config('app.stage')=='TEST'){ $m->to('beszerzes@delirest.hu'); } - if(env('APP_STAGE')=='DEV'){ + if(config('app.stage')=='DEV'){ $m->to('city@e98.hu'); } @@ -303,13 +303,13 @@ private function notificationNewPriceList($priceListId) $destEmail->each(function ($emailAddress) use ($emailData) { \Mail::send('email.priceListChangeNotify', $emailData, function ($m) use ($emailAddress) { $m->subject('Árlista változás '); - if (env('APP_STAGE') == 'PROD') { + if (config('app.stage') == 'PROD') { $m->to($emailAddress); } else { - if (env('APP_STAGE') == 'TEST') { + if (config('app.stage') == 'TEST') { $m->to('beszerzes@delirest.hu'); } - if (env('APP_STAGE') == 'DEV') { + if (config('app.stage') == 'DEV') { $m->to('city@e98.hu'); } } diff --git a/resources/views/dashboard.blade.php b/resources/views/dashboard.blade.php index 73ea5f2..dec8a11 100644 --- a/resources/views/dashboard.blade.php +++ b/resources/views/dashboard.blade.php @@ -82,7 +82,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-05-17 11:53"; @endphp @@ -102,7 +102,7 @@ {{-- This is displayed - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-09-30 11:14"; @@ -123,7 +123,7 @@

ChangeLog

- @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-10-17 10:51"; @@ -135,7 +135,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-10-15 19:11"; @endphp @@ -146,7 +146,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-10-04 12:45"; @@ -161,7 +161,7 @@ @endif - @if (env('APP_STAGE')=='PROD') + @if (config('app.stage')=='PROD') @php $featureStartTime="2023-09-30 09:02"; @endphp @@ -179,7 +179,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-09-13 19:32"; @@ -190,7 +190,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-09-10 10:21"; @@ -208,7 +208,7 @@ @endif - @if (env('APP_STAGE')=='PROD') + @if (config('app.stage')=='PROD') @php $featureStartTime="2023-06-18 17:20"; @@ -236,7 +236,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-06-18 17:20"; @@ -249,7 +249,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-06-09 08:10"; @endphp @@ -261,7 +261,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-06-08 09:22"; @endphp @@ -275,7 +275,7 @@ - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-05-15 13:10"; @endphp @@ -287,7 +287,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-05-04 11:17"; @endphp @@ -298,7 +298,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-04-26 07:28"; @endphp @@ -309,7 +309,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-04-26 05:51"; @endphp @@ -322,7 +322,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-03-30 19:41"; @endphp @@ -333,7 +333,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-03-29 18:01"; @endphp @@ -344,7 +344,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-03-28 23:12"; @endphp @@ -382,7 +382,7 @@ - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-02-19 20:01"; @endphp @@ -397,7 +397,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-02-15 08:12"; @endphp @@ -412,7 +412,7 @@ @endphp @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2023-01-30 05:53"; @endphp @@ -426,7 +426,7 @@ @endphp @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-11-22 13:45"; @endphp @@ -442,7 +442,7 @@
  • NEW "Megrendelések szűrő"[EV3-63]
  • - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-11-02 07:12"; @endphp @@ -458,7 +458,7 @@
  • CHANGE Termékek kiválasztásánál oszlopok szélességének átállítása
  • - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-10-06 10:58"; @endphp @@ -472,7 +472,7 @@
  • NEW "Legkisebb eladási egység - mennyiségi egység"[EV3-62]
  • - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-07-06 07:58"; @endphp @@ -486,7 +486,7 @@
  • CHANGE,FIX "Új termékcsoport felvétel"[EV3-59]
  • - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-06-20 06:19"; @endphp @@ -508,7 +508,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-06-08 11:35"; @endphp @@ -522,7 +522,7 @@ @endphp @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-06-01 06:11"; @endphp @@ -543,7 +543,7 @@ - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-05-17 06:32"; @endphp @@ -559,7 +559,7 @@ - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-05-12 09:45"; @endphp @@ -580,7 +580,7 @@ @endif - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-05-10 11:53"; @endphp @@ -603,7 +603,7 @@
  • FIX "Megrendelés visszaigazolás időpontja"[EV3-50]
  • - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-04-11 06:53"; @endphp @@ -620,7 +620,7 @@
  • NEW PART "Beszállító megjegyzés rovat"[EV3-46]
  • - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-03-31 12:30"; @endphp @@ -640,7 +640,7 @@ - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-03-25 05:57"; @endphp @@ -672,7 +672,7 @@ - @if (env('APP_STAGE')!='PROD') + @if (config('app.stage')!='PROD') @php $featureStartTime="2022-03-09 07:30"; @endphp diff --git a/resources/views/filament/components/speed-button-nav-bar.blade.php b/resources/views/filament/components/speed-button-nav-bar.blade.php index 2fe1ee6..d2db389 100644 --- a/resources/views/filament/components/speed-button-nav-bar.blade.php +++ b/resources/views/filament/components/speed-button-nav-bar.blade.php @@ -96,8 +96,8 @@ class="w-16 h-16 object-contain mb-1" @endrole @endforeach - @if (env('APP_STAGE', 'DEV') != 'PROD') -

    site:{{ env('APP_STAGE', 'DEV') }}

    + @if (config('app.stage', 'DEV') != 'PROD') +

    site:{{ config('app.stage', 'DEV') }}

    @endif
    loginUsingId(1); // auth()->logout(); -if (in_array(strtolower(env('APP_STAGE')), ['d2dtst', 'e2etst'])) { +if (in_array(strtolower(config('app.stage')), ['d2dtst', 'e2etst'])) { echo view('layout.wherehere')->render(); exit(); } @@ -38,7 +38,7 @@ ]); }); /* -if (! in_array(strtolower(env('APP_STAGE')), ['d2dtst', 'e2etst', 'dev','local'])) { +if (! in_array(strtolower(config('app.stage')), ['d2dtst', 'e2etst', 'dev','local'])) { URL::forceScheme('https'); } else { URL::forceScheme('http');