MOD change env call to config call in project

This commit is contained in:
E98Developer 2026-08-09 07:15:37 +02:00
parent a6b11d2178
commit 856b61da88
5 changed files with 47 additions and 47 deletions

View File

@ -158,7 +158,7 @@ private function sendNotification(int $orderArchiveId)
$to[] = $orderData['customNotificationEmail']; $to[] = $orderData['customNotificationEmail'];
} }
if (env('APP_STAGE', 'DEV') == 'PROD') { if (config('app.stage', 'DEV') == 'PROD') {
$to[] = $orderData['supplier']['orderEmail']; $to[] = $orderData['supplier']['orderEmail'];
if ($orderData['supplier']['orderEmail2']) { if ($orderData['supplier']['orderEmail2']) {
$to[] = $orderData['supplier']['orderEmail2']; $to[] = $orderData['supplier']['orderEmail2'];

View File

@ -90,13 +90,13 @@ public function index(): View|Response|JsonResponse
$m->subject('Árlista változás '); $m->subject('Árlista változás ');
$m->to($emailAddress); $m->to($emailAddress);
/* /*
if(env('APP_STAGE')=='PROD'){ if(config('app.stage')=='PROD'){
$m->to($emailAddress); $m->to($emailAddress);
}else{ }else{
if(env('APP_STAGE')=='TEST'){ if(config('app.stage')=='TEST'){
$m->to('beszerzes@delirest.hu'); $m->to('beszerzes@delirest.hu');
} }
if(env('APP_STAGE')=='DEV'){ if(config('app.stage')=='DEV'){
$m->to('city@e98.hu'); $m->to('city@e98.hu');
} }
@ -303,13 +303,13 @@ private function notificationNewPriceList($priceListId)
$destEmail->each(function ($emailAddress) use ($emailData) { $destEmail->each(function ($emailAddress) use ($emailData) {
\Mail::send('email.priceListChangeNotify', $emailData, function ($m) use ($emailAddress) { \Mail::send('email.priceListChangeNotify', $emailData, function ($m) use ($emailAddress) {
$m->subject('Árlista változás '); $m->subject('Árlista változás ');
if (env('APP_STAGE') == 'PROD') { if (config('app.stage') == 'PROD') {
$m->to($emailAddress); $m->to($emailAddress);
} else { } else {
if (env('APP_STAGE') == 'TEST') { if (config('app.stage') == 'TEST') {
$m->to('beszerzes@delirest.hu'); $m->to('beszerzes@delirest.hu');
} }
if (env('APP_STAGE') == 'DEV') { if (config('app.stage') == 'DEV') {
$m->to('city@e98.hu'); $m->to('city@e98.hu');
} }
} }

View File

@ -82,7 +82,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-05-17 11:53"; $featureStartTime="2022-05-17 11:53";
@endphp @endphp
@ -102,7 +102,7 @@
{{-- {{--
This is displayed This is displayed
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-09-30 11:14"; $featureStartTime="2023-09-30 11:14";
@ -123,7 +123,7 @@
<hr> <hr>
<p class="lead">ChangeLog </p> <p class="lead">ChangeLog </p>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-10-17 10:51"; $featureStartTime="2023-10-17 10:51";
@ -135,7 +135,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-10-15 19:11"; $featureStartTime="2023-10-15 19:11";
@endphp @endphp
@ -146,7 +146,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-10-04 12:45"; $featureStartTime="2023-10-04 12:45";
@ -161,7 +161,7 @@
@endif @endif
@if (env('APP_STAGE')=='PROD') @if (config('app.stage')=='PROD')
@php @php
$featureStartTime="2023-09-30 09:02"; $featureStartTime="2023-09-30 09:02";
@endphp @endphp
@ -179,7 +179,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-09-13 19:32"; $featureStartTime="2023-09-13 19:32";
@ -190,7 +190,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-09-10 10:21"; $featureStartTime="2023-09-10 10:21";
@ -208,7 +208,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')=='PROD') @if (config('app.stage')=='PROD')
@php @php
$featureStartTime="2023-06-18 17:20"; $featureStartTime="2023-06-18 17:20";
@ -236,7 +236,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-06-18 17:20"; $featureStartTime="2023-06-18 17:20";
@ -249,7 +249,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-06-09 08:10"; $featureStartTime="2023-06-09 08:10";
@endphp @endphp
@ -261,7 +261,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-06-08 09:22"; $featureStartTime="2023-06-08 09:22";
@endphp @endphp
@ -275,7 +275,7 @@
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-05-15 13:10"; $featureStartTime="2023-05-15 13:10";
@endphp @endphp
@ -287,7 +287,7 @@
</ul> </ul>
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-05-04 11:17"; $featureStartTime="2023-05-04 11:17";
@endphp @endphp
@ -298,7 +298,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-04-26 07:28"; $featureStartTime="2023-04-26 07:28";
@endphp @endphp
@ -309,7 +309,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-04-26 05:51"; $featureStartTime="2023-04-26 05:51";
@endphp @endphp
@ -322,7 +322,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-03-30 19:41"; $featureStartTime="2023-03-30 19:41";
@endphp @endphp
@ -333,7 +333,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-03-29 18:01"; $featureStartTime="2023-03-29 18:01";
@endphp @endphp
@ -344,7 +344,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-03-28 23:12"; $featureStartTime="2023-03-28 23:12";
@endphp @endphp
@ -382,7 +382,7 @@
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-02-19 20:01"; $featureStartTime="2023-02-19 20:01";
@endphp @endphp
@ -397,7 +397,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-02-15 08:12"; $featureStartTime="2023-02-15 08:12";
@endphp @endphp
@ -412,7 +412,7 @@
@endphp @endphp
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2023-01-30 05:53"; $featureStartTime="2023-01-30 05:53";
@endphp @endphp
@ -426,7 +426,7 @@
@endphp @endphp
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-11-22 13:45"; $featureStartTime="2022-11-22 13:45";
@endphp @endphp
@ -442,7 +442,7 @@
<li>NEW "Megrendelések szűrő"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-63">[EV3-63]</a></li> <li>NEW "Megrendelések szűrő"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-63">[EV3-63]</a></li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-11-02 07:12"; $featureStartTime="2022-11-02 07:12";
@endphp @endphp
@ -458,7 +458,7 @@
<li>CHANGE Termékek kiválasztásánál oszlopok szélességének átállítása</li> <li>CHANGE Termékek kiválasztásánál oszlopok szélességének átállítása</li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-10-06 10:58"; $featureStartTime="2022-10-06 10:58";
@endphp @endphp
@ -472,7 +472,7 @@
<li>NEW "Legkisebb eladási egység - mennyiségi egység"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-62">[EV3-62]</a></li> <li>NEW "Legkisebb eladási egység - mennyiségi egység"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-62">[EV3-62]</a></li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-07-06 07:58"; $featureStartTime="2022-07-06 07:58";
@endphp @endphp
@ -486,7 +486,7 @@
<li>CHANGE,FIX "Új termékcsoport felvétel"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-59">[EV3-59]</a></li> <li>CHANGE,FIX "Új termékcsoport felvétel"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-59">[EV3-59]</a></li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-06-20 06:19"; $featureStartTime="2022-06-20 06:19";
@endphp @endphp
@ -508,7 +508,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-06-08 11:35"; $featureStartTime="2022-06-08 11:35";
@endphp @endphp
@ -522,7 +522,7 @@
@endphp @endphp
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-06-01 06:11"; $featureStartTime="2022-06-01 06:11";
@endphp @endphp
@ -543,7 +543,7 @@
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-05-17 06:32"; $featureStartTime="2022-05-17 06:32";
@endphp @endphp
@ -559,7 +559,7 @@
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-05-12 09:45"; $featureStartTime="2022-05-12 09:45";
@endphp @endphp
@ -580,7 +580,7 @@
@endif @endif
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-05-10 11:53"; $featureStartTime="2022-05-10 11:53";
@endphp @endphp
@ -603,7 +603,7 @@
<li>FIX "Megrendelés visszaigazolás időpontja"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-50">[EV3-50]</a></li> <li>FIX "Megrendelés visszaigazolás időpontja"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-50">[EV3-50]</a></li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-04-11 06:53"; $featureStartTime="2022-04-11 06:53";
@endphp @endphp
@ -620,7 +620,7 @@
<li>NEW PART "Beszállító megjegyzés rovat"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-46">[EV3-46]</a></li> <li>NEW PART "Beszállító megjegyzés rovat"<a class="pmLink" href="http://pm.e98.hu/issue/EV3-46">[EV3-46]</a></li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-03-31 12:30"; $featureStartTime="2022-03-31 12:30";
@endphp @endphp
@ -640,7 +640,7 @@
</li> </li>
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-03-25 05:57"; $featureStartTime="2022-03-25 05:57";
@endphp @endphp
@ -672,7 +672,7 @@
</ul> </ul>
@if (env('APP_STAGE')!='PROD') @if (config('app.stage')!='PROD')
@php @php
$featureStartTime="2022-03-09 07:30"; $featureStartTime="2022-03-09 07:30";
@endphp @endphp

View File

@ -96,8 +96,8 @@ class="w-16 h-16 object-contain mb-1"
@endrole @endrole
@endforeach @endforeach
</ul> </ul>
@if (env('APP_STAGE', 'DEV') != 'PROD') @if (config('app.stage', 'DEV') != 'PROD')
<h2 class="text-[#b83400] font-bold text-lg ml-4">site:{{ env('APP_STAGE', 'DEV') }}</h2> <h2 class="text-[#b83400] font-bold text-lg ml-4">site:{{ config('app.stage', 'DEV') }}</h2>
@endif @endif
<div class="ml-auto flex items-center pr-2"> <div class="ml-auto flex items-center pr-2">
<img style="max-width: none; height: 59px; vertical-align: middle; margin-top: 20px;" <img style="max-width: none; height: 59px; vertical-align: middle; margin-top: 20px;"

View File

@ -25,7 +25,7 @@
// auth()->loginUsingId(1); // auth()->loginUsingId(1);
// auth()->logout(); // 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(); echo view('layout.wherehere')->render();
exit(); 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'); URL::forceScheme('https');
} else { } else {
URL::forceScheme('http'); URL::forceScheme('http');