fix installation issue & add ver update listener

This commit is contained in:
raishvaria
2019-11-22 15:11:11 +05:30
parent 66a1156d5c
commit dd0817709b
5 changed files with 68 additions and 27 deletions

View File

@ -0,0 +1,39 @@
<?php
namespace Crater\Listeners\Updates\v1;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;
use Crater\Events\UpdateFinished;
use Crater\Setting;
class Version110
{
const VERSION = '1.1.0';
/**
* Create the event listener.
*
* @return void
*/
public function __construct()
{
//
}
/**
* Handle the event.
*
* @param object $event
* @return void
*/
public function handle(UpdateFinished $event)
{
if (!$this->check($event)) {
return;
}
// Update Crater app version
Setting::setSetting('version', static::VERSION);
}
}