added date picker #681
This commit is contained in:
		
							
								
								
									
										30
									
								
								app/Listeners/Updates/Version135.php
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										30
									
								
								app/Listeners/Updates/Version135.php
									
									
									
									
									
										Normal file
									
								
							@@ -0,0 +1,30 @@
 | 
			
		||||
<?php
 | 
			
		||||
 | 
			
		||||
namespace App\Listeners\Updates;
 | 
			
		||||
 | 
			
		||||
use App\Events\UpdateFinished;
 | 
			
		||||
 | 
			
		||||
class Version135 extends Listener
 | 
			
		||||
{
 | 
			
		||||
    const ALIAS = 'core';
 | 
			
		||||
 | 
			
		||||
    const VERSION = '1.3.5';
 | 
			
		||||
 | 
			
		||||
    /**
 | 
			
		||||
     * Handle the event.
 | 
			
		||||
     *
 | 
			
		||||
     * @param  $event
 | 
			
		||||
     * @return void
 | 
			
		||||
     */
 | 
			
		||||
    public function handle(UpdateFinished $event)
 | 
			
		||||
    {
 | 
			
		||||
        // Check if should listen
 | 
			
		||||
        if (!$this->check($event)) {
 | 
			
		||||
            return;
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
        // Add financial year start to settings
 | 
			
		||||
        setting(['general.financial_start' => Date::now()->startOfYear()->format('d F')]);
 | 
			
		||||
        setting()->save();
 | 
			
		||||
    }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user