phpvms/app/Cron/Nightly/NewVersionCheck.php
Nabeel S 936cd2efd3
Implement PIREP deletion #1014 (#1055)
* Implement PIREP deletion #1014

* Style fixes

* Add delete button to PIREP listing page

* Remove extra import
2021-03-02 15:43:34 -05:00

36 lines
751 B
PHP

<?php
namespace App\Cron\Nightly;
use App\Contracts\Listener;
use App\Events\CronNightly;
use App\Services\VersionService;
use Illuminate\Support\Facades\Log;
/**
* Determine if any pilots should be set to ON LEAVE status
*/
class NewVersionCheck extends Listener
{
private $versionSvc;
/**
* @param VersionService $versionSvc
*/
public function __construct(VersionService $versionSvc)
{
$this->versionSvc = $versionSvc;
}
/**
* Set any users to being on leave after X days
*
* @param CronNightly $event
*/
public function handle(CronNightly $event): void
{
Log::info('Nightly: Checking for new version');
$this->versionSvc->isNewVersionAvailable();
}
}