diff --git a/app/Listeners/Update/V31/Version315.php b/app/Listeners/Update/V31/Version315.php index f00a9a100..37dd1d07e 100644 --- a/app/Listeners/Update/V31/Version315.php +++ b/app/Listeners/Update/V31/Version315.php @@ -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...'); diff --git a/app/Providers/Event.php b/app/Providers/Event.php index 4d197d0c7..7c075a438 100644 --- a/app/Providers/Event.php +++ b/app/Providers/Event.php @@ -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',