Skip to content

Commit

Permalink
update listener and add event provider
Browse files Browse the repository at this point in the history
  • Loading branch information
cuneytsenturk committed Dec 11, 2023
1 parent be46caa commit b091d63
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app/Listeners/Update/V31/Version315.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
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;

Expand All @@ -28,11 +29,23 @@ public function handle(Event $event)

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...');
Expand Down
1 change: 1 addition & 0 deletions app/Providers/Event.php
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit b091d63

Please sign in to comment.