62 lines
1.9 KiB
PHP
62 lines
1.9 KiB
PHP
<?php
|
|
|
|
use Illuminate\Support\Facades\Route;
|
|
use Illuminate\Support\Facades\DB;
|
|
use Laravel\Fortify\Features;
|
|
use Livewire\Volt\Volt;
|
|
|
|
Route::get('/', function () {
|
|
return view('welcome');
|
|
})->name('home');
|
|
|
|
// 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');
|
|
return response()->json([
|
|
'status' => 'Erfolgreich verbunden mit zweiter Datenbank',
|
|
'zeitstempel' => $result[0]->current_time
|
|
]);
|
|
} catch (\Exception $e) {
|
|
return response()->json([
|
|
'status' => 'Fehler bei der Verbindung',
|
|
'meldung' => $e->getMessage()
|
|
], 500);
|
|
}
|
|
});
|
|
|
|
|
|
Route::view('dashboard', 'dashboard')
|
|
->middleware(['auth', 'verified'])
|
|
->name('dashboard');
|
|
|
|
Volt::route('company-search', 'company-search')
|
|
->middleware(['auth', 'verified'])
|
|
->name('company-search');
|
|
|
|
Volt::route('transaction-review', 'transaction-review')
|
|
->middleware(['auth', 'verified'])
|
|
->name('transaction-review');
|
|
|
|
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');
|
|
});
|
|
|
|
require __DIR__ . '/auth.php';
|