wizard company country issue (#2262)

This commit is contained in:
Cihan Şentürk
2021-10-02 15:25:59 +03:00
parent cc21a62ae7
commit 306ec964b2
3 changed files with 38 additions and 1 deletions

View File

@ -0,0 +1,34 @@
<?php
namespace App\Listeners\Update\V21;
use App\Abstracts\Listeners\Update as Listener;
use App\Events\Install\UpdateFinished as Event;
class Version2126 extends Listener
{
const ALIAS = 'core';
const VERSION = '2.1.26';
/**
* Handle the event.
*
* @param $event
*
* @return void
*/
public function handle(Event $event)
{
if ($this->skipThisUpdate($event)) {
return;
}
$country_code = array_search(setting('company.country'), trans('countries'));
if ($country_code) {
setting()->set('company.country', $country_code);
setting()->save();
}
}
}

View File

@ -37,6 +37,7 @@ class Event extends Provider
'App\Listeners\Update\V21\Version2118',
'App\Listeners\Update\V21\Version2124',
'App\Listeners\Update\V21\Version2125',
'App\Listeners\Update\V21\Version2126',
],
'Illuminate\Auth\Events\Login' => [
'App\Listeners\Auth\Login',