style updates
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
<?php
|
||||
|
||||
namespace Modules\Enterprise\Http\Controllers;
|
||||
|
||||
use Illuminate\Http\RedirectResponse;
|
||||
@@ -33,6 +34,7 @@ final class EnterpriseController
|
||||
{
|
||||
$result = $service->run();
|
||||
HealthRun::create(['user_id' => auth()->id(), 'status' => $result['status'], 'results' => $result, 'ran_at' => now()]);
|
||||
|
||||
return back()->with('status', 'Health checks completed.');
|
||||
}
|
||||
|
||||
@@ -40,18 +42,21 @@ final class EnterpriseController
|
||||
{
|
||||
Artisan::call('optimize:clear');
|
||||
Cache::flush();
|
||||
|
||||
return back()->with('status', 'Application and cache stores cleared.');
|
||||
}
|
||||
|
||||
public function runScheduler(): RedirectResponse
|
||||
{
|
||||
Artisan::call('schedule:run');
|
||||
|
||||
return back()->with('status', trim(Artisan::output()) ?: 'Scheduler executed.');
|
||||
}
|
||||
|
||||
public function retryFailedJobs(): RedirectResponse
|
||||
{
|
||||
Artisan::call('queue:retry', ['id' => 'all']);
|
||||
|
||||
return back()->with('status', trim(Artisan::output()) ?: 'Failed jobs queued for retry.');
|
||||
}
|
||||
|
||||
@@ -59,9 +64,11 @@ final class EnterpriseController
|
||||
{
|
||||
try {
|
||||
$service->create(auth()->id());
|
||||
|
||||
return back()->with('status', 'Backup created.');
|
||||
} catch (Throwable $e) {
|
||||
report($e);
|
||||
|
||||
return back()->withErrors(['backup' => $e->getMessage()]);
|
||||
}
|
||||
}
|
||||
@@ -69,6 +76,7 @@ final class EnterpriseController
|
||||
public function deleteBackup(Backup $backup, BackupService $service): RedirectResponse
|
||||
{
|
||||
$service->delete($backup);
|
||||
|
||||
return back()->with('status', 'Backup deleted.');
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user