2025-10-16 14:22:46 +02:00
|
|
|
<?php
|
|
|
|
|
|
2025-10-20 09:53:34 +02:00
|
|
|
use Illuminate\Support\Facades\DB;
|
2025-10-20 22:10:08 +02:00
|
|
|
use Illuminate\Support\Facades\Route;
|
2025-10-16 14:22:46 +02:00
|
|
|
use Laravel\Fortify\Features;
|
|
|
|
|
use Livewire\Volt\Volt;
|
|
|
|
|
|
|
|
|
|
Route::get('/', function () {
|
|
|
|
|
return view('welcome');
|
|
|
|
|
})->name('home');
|
|
|
|
|
|
2025-10-20 09:53:34 +02:00
|
|
|
// Test Route für PGSQL - kann beliebig abgeändert werden (zum Testen)
|
|
|
|
|
Route::get('/test-zweite-db', function () {
|
|
|
|
|
try {
|
|
|
|
|
// Eine einfache Abfrage auf der zweiten Verbindung
|
|
|
|
|
$result = DB::connection('pgsql_second')->select('SELECT NOW() as current_time');
|
2025-10-20 22:10:08 +02:00
|
|
|
|
2025-10-20 09:53:34 +02:00
|
|
|
return response()->json([
|
|
|
|
|
'status' => 'Erfolgreich verbunden mit zweiter Datenbank',
|
2025-10-20 22:10:08 +02:00
|
|
|
'zeitstempel' => $result[0]->current_time,
|
2025-10-20 09:53:34 +02:00
|
|
|
]);
|
|
|
|
|
} catch (\Exception $e) {
|
|
|
|
|
return response()->json([
|
|
|
|
|
'status' => 'Fehler bei der Verbindung',
|
2025-10-20 22:10:08 +02:00
|
|
|
'meldung' => $e->getMessage(),
|
2025-10-20 09:53:34 +02:00
|
|
|
], 500);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
2025-10-16 14:22:46 +02:00
|
|
|
Route::view('dashboard', 'dashboard')
|
|
|
|
|
->middleware(['auth', 'verified'])
|
|
|
|
|
->name('dashboard');
|
|
|
|
|
|
2025-10-20 09:53:34 +02:00
|
|
|
Volt::route('company-search', 'company-search')
|
2025-10-17 09:20:35 +02:00
|
|
|
->middleware(['auth', 'verified'])
|
|
|
|
|
->name('company-search');
|
|
|
|
|
|
2025-10-20 20:48:48 +02:00
|
|
|
Volt::route('transaction-review', 'transaction-review')
|
|
|
|
|
->middleware(['auth', 'verified'])
|
|
|
|
|
->name('transaction-review');
|
|
|
|
|
|
2025-10-24 07:11:28 +02:00
|
|
|
Volt::route('companies/{company}/transactions', 'companies.transactions')
|
|
|
|
|
->middleware(['auth', 'verified'])
|
|
|
|
|
->name('company.transactions');
|
|
|
|
|
|
2025-11-13 16:21:26 +01:00
|
|
|
Volt::route('upload', 'upload.index')
|
|
|
|
|
->middleware(['auth', 'verified'])
|
|
|
|
|
->name('upload');
|
|
|
|
|
|
2025-10-16 14:22:46 +02:00
|
|
|
Route::middleware(['auth'])->group(function () {
|
|
|
|
|
Route::redirect('settings', 'settings/profile');
|
|
|
|
|
|
|
|
|
|
Volt::route('settings/profile', 'settings.profile')->name('profile.edit');
|
|
|
|
|
Volt::route('settings/password', 'settings.password')->name('password.edit');
|
|
|
|
|
Volt::route('settings/appearance', 'settings.appearance')->name('appearance.edit');
|
|
|
|
|
|
|
|
|
|
Volt::route('settings/two-factor', 'settings.two-factor')
|
|
|
|
|
->middleware(
|
|
|
|
|
when(
|
|
|
|
|
Features::canManageTwoFactorAuthentication()
|
|
|
|
|
&& Features::optionEnabled(Features::twoFactorAuthentication(), 'confirmPassword'),
|
|
|
|
|
['password.confirm'],
|
|
|
|
|
[],
|
|
|
|
|
),
|
|
|
|
|
)
|
|
|
|
|
->name('two-factor.show');
|
|
|
|
|
});
|
|
|
|
|
|
2025-10-20 22:10:08 +02:00
|
|
|
require __DIR__.'/auth.php';
|