mirror of
https://github.com/lkddi/Xboard.git
synced 2026-04-15 04:10:51 +08:00
19 lines
461 B
PHP
19 lines
461 B
PHP
|
|
<?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();
|
||
|
|
});
|
||
|
|
}
|
||
|
|
}
|
||
|
|
}
|