toaster
This commit is contained in:
22
app/Http/Livewire/Upgrade.php
Normal file
22
app/Http/Livewire/Upgrade.php
Normal file
@@ -0,0 +1,22 @@
|
||||
<?php
|
||||
|
||||
namespace App\Http\Livewire;
|
||||
|
||||
use Masmerise\Toaster\Toaster;
|
||||
use App\Jobs\InstanceAutoUpdateJob;
|
||||
use Livewire\Component;
|
||||
|
||||
class Upgrade extends Component
|
||||
{
|
||||
public bool $showProgress = false;
|
||||
public function upgrade()
|
||||
{
|
||||
try {
|
||||
$this->showProgress = true;
|
||||
dispatch(new InstanceAutoUpdateJob(force: true));
|
||||
Toaster::success('Update started.');
|
||||
} catch (\Exception $e) {
|
||||
return general_error_handler(err: $e, that: $this);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user