feat: add one-click update feature to admin panel

This commit is contained in:
xboard
2025-02-09 13:43:09 +08:00
parent 1b728fffc7
commit 39456923d3
15 changed files with 660 additions and 100 deletions
+19
View File
@@ -0,0 +1,19 @@
<?php
namespace App\Providers;
use App\Services\UpdateService;
use Illuminate\Support\ServiceProvider;
use Laravel\Octane\Events\WorkerStarting;
class OctaneVersionProvider extends ServiceProvider
{
public function boot(): void
{
if ($this->app->bound('octane')) {
$this->app['events']->listen(WorkerStarting::class, function () {
app(UpdateService::class)->updateVersionCache();
});
}
}
}