2023-04-28 13:08:48 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
namespace App\Http\Livewire;
|
|
|
|
|
2023-05-25 12:23:49 +00:00
|
|
|
use App\Jobs\InstanceAutoUpdateJob;
|
2023-04-28 13:08:48 +00:00
|
|
|
use Livewire\Component;
|
|
|
|
|
|
|
|
class ForceUpgrade extends Component
|
|
|
|
{
|
2023-05-26 10:24:59 +00:00
|
|
|
public bool $visible = false;
|
2023-04-28 13:08:48 +00:00
|
|
|
public function upgrade()
|
|
|
|
{
|
2023-05-25 20:33:47 +00:00
|
|
|
try {
|
2023-05-26 10:24:59 +00:00
|
|
|
$this->visible = true;
|
2023-05-25 20:59:33 +00:00
|
|
|
dispatch(new InstanceAutoUpdateJob(force: true));
|
2023-05-25 20:33:47 +00:00
|
|
|
} catch (\Exception $e) {
|
2023-06-09 13:55:21 +00:00
|
|
|
return general_error_handler(err: $e, that: $this);
|
2023-05-25 20:33:47 +00:00
|
|
|
}
|
2023-04-28 13:08:48 +00:00
|
|
|
}
|
|
|
|
}
|