pp-planer/app/Http/Controllers/SyncController.php
Thorsten Bus 04d271f96a style: apply Laravel Pint formatting across codebase
Auto-formatted by Laravel Pint (default Laravel preset): string
concatenation spacing, anonymous class brace placement, constructor
body shorthand, import ordering, and assertion indentation.
2026-03-02 23:02:03 +01:00

21 lines
490 B
PHP

<?php
namespace App\Http\Controllers;
use App\Services\ChurchToolsService;
use Illuminate\Http\RedirectResponse;
class SyncController extends Controller
{
public function sync(ChurchToolsService $service): RedirectResponse
{
try {
$service->sync();
return back()->with('success', 'Daten wurden aktualisiert');
} catch (\Throwable $e) {
return back()->with('error', 'Sync fehlgeschlagen: '.$e->getMessage());
}
}
}