Paypal Standard Payment Gateways App
This commit is contained in:
		
							
								
								
									
										36
									
								
								app/Listeners/Updates/Version109.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										36
									
								
								app/Listeners/Updates/Version109.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,36 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace App\Listeners\Updates;
 | 
			
		||||
 | 
			
		||||
use App\Events\UpdateFinished;
 | 
			
		||||
use App\Models\Company\Company;
 | 
			
		||||
use Artisan;
 | 
			
		||||
 | 
			
		||||
class Version109 extends Listener
 | 
			
		||||
{
 | 
			
		||||
    const ALIAS = 'core';
 | 
			
		||||
 | 
			
		||||
    const VERSION = '1.0.9';
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Handle the event.
 | 
			
		||||
     *
 | 
			
		||||
     * @param  $event
 | 
			
		||||
     * @return void
 | 
			
		||||
     */
 | 
			
		||||
    public function handle(UpdateFinished $event)
 | 
			
		||||
    {
 | 
			
		||||
        // Check if should listen
 | 
			
		||||
        if (!$this->check($event)) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Create new bill statuses
 | 
			
		||||
        $companies = Company::all();
 | 
			
		||||
 | 
			
		||||
        foreach ($companies as $company) {
 | 
			
		||||
            Artisan::call('module:install', ['alias' => 'offlinepayment', 'company_id' => $company->id]);
 | 
			
		||||
            Artisan::call('module:install', ['alias' => 'paypalstandard', 'company_id' => $company->id]);
 | 
			
		||||
        }
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user