update listener and add event provider
This commit is contained in:
parent
be46caa086
commit
b091d63560
|
|
@ -5,6 +5,7 @@ namespace App\Listeners\Update\V31;
|
|||
use App\Abstracts\Listeners\Update as Listener;
|
||||
use App\Events\Install\UpdateFinished as Event;
|
||||
use App\Models\Common\Widget;
|
||||
use Illuminate\Support\Facades\Artisan;
|
||||
use Illuminate\Support\Facades\Log;
|
||||
use Illuminate\Support\Str;
|
||||
|
||||
|
|
@ -28,11 +29,23 @@ class Version315 extends Listener
|
|||
|
||||
Log::channel('stdout')->info('Updating to 3.1.5 version...');
|
||||
|
||||
$this->clearCache();
|
||||
|
||||
$this->updateWidgets();
|
||||
|
||||
Log::channel('stdout')->info('Done!');
|
||||
}
|
||||
|
||||
public function clearCache(): void
|
||||
{
|
||||
Log::channel('stdout')->info('Clearing cache...');
|
||||
|
||||
Artisan::call('view:clear');
|
||||
Artisan::call('cache:clear');
|
||||
|
||||
Log::channel('stdout')->info('Cleared cache.');
|
||||
}
|
||||
|
||||
public function updateWidgets()
|
||||
{
|
||||
Log::channel('stdout')->info('Updating widgets...');
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ class Event extends Provider
|
|||
'App\Listeners\Update\V30\Version3016',
|
||||
'App\Listeners\Update\V30\Version3017',
|
||||
'App\Listeners\Update\V31\Version310',
|
||||
'App\Listeners\Update\V31\Version315',
|
||||
],
|
||||
'Illuminate\Auth\Events\Login' => [
|
||||
'App\Listeners\Auth\Login',
|
||||
|
|
|
|||
Loading…
Reference in New Issue