wizard company country issue (#2262)
This commit is contained in:
		
							
								
								
									
										34
									
								
								app/Listeners/Update/V21/Version2126.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										34
									
								
								app/Listeners/Update/V21/Version2126.php
									
									
									
									
									
										Normal 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();
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user