Skip to content

Commit

Permalink
Migrate + Optimize
Browse files Browse the repository at this point in the history
  • Loading branch information
bishwajitcadhikary committed Jul 31, 2023
1 parent 3fb072e commit 278e36f
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions src/Installer.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@
use Exception;
use GuzzleHttp\Promise\PromiseInterface;
use Illuminate\Http\Client\Response;
use Illuminate\Support\Facades\Artisan;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Facades\Storage;
use ZipArchive;
Expand Down Expand Up @@ -90,6 +91,10 @@ public function update(): void
}

$this->updateVersion($files['version']);

$this->runMigrations();

$this->optimizeApplication();
}

/**
Expand Down Expand Up @@ -245,4 +250,16 @@ private function updateVersion(mixed $version): void
flash(trans('Failed to upgrade the application'), 'error');
}
}

private function runMigrations(): void
{
Artisan::call('migrate', [
'--force' => true,
]);
}

private function optimizeApplication(): void
{
Artisan::call('optimize:clear');
}
}

0 comments on commit 278e36f

Please sign in to comment.