20-02-2026
This commit is contained in:
parent
a8b395e20d
commit
a00c42e770
252 changed files with 28785 additions and 8907 deletions
|
|
@ -16,31 +16,31 @@ if (\App\Domain\EarlyDomainParser::getCurrentDomainType() === 'checkout') {
|
|||
// Shop-Domain aus Config laden
|
||||
$shopHost = config('domains.domains.shop.host');
|
||||
$protocol = config('domains.protocol', 'https://');
|
||||
$shopBaseUrl = $protocol . $shopHost;
|
||||
$shopBaseUrl = $protocol.$shopHost;
|
||||
|
||||
// Für Checkout-Domain: Umleitung zur Shop-Domain
|
||||
Route::get('/datenschutz', function () use ($shopBaseUrl) {
|
||||
return redirect()->away($shopBaseUrl . '/datenschutz');
|
||||
return redirect()->away($shopBaseUrl.'/datenschutz');
|
||||
})->name('legal.data-protected');
|
||||
|
||||
Route::get('/impressum', function () use ($shopBaseUrl) {
|
||||
return redirect()->away($shopBaseUrl . '/impressum');
|
||||
return redirect()->away($shopBaseUrl.'/impressum');
|
||||
})->name('legal.imprint');
|
||||
|
||||
Route::get('/agb', function () use ($shopBaseUrl) {
|
||||
return redirect()->away($shopBaseUrl . '/agb');
|
||||
return redirect()->away($shopBaseUrl.'/agb');
|
||||
})->name('legal.agb');
|
||||
|
||||
Route::get('/kontakt', function () use ($shopBaseUrl) {
|
||||
return redirect()->away($shopBaseUrl . '/kontakt');
|
||||
return redirect()->away($shopBaseUrl.'/kontakt');
|
||||
})->name('contact.create');
|
||||
|
||||
Route::get('/zahlungsarten', function () use ($shopBaseUrl) {
|
||||
return redirect()->away($shopBaseUrl . '/zahlungsarten');
|
||||
return redirect()->away($shopBaseUrl.'/zahlungsarten');
|
||||
})->name('zahlungsarten');
|
||||
|
||||
Route::get('/versandkosten', function () use ($shopBaseUrl) {
|
||||
return redirect()->away($shopBaseUrl . '/versandkosten');
|
||||
return redirect()->away($shopBaseUrl.'/versandkosten');
|
||||
})->name('versandkosten');
|
||||
} else {
|
||||
// Für alle anderen Domains: normale Controller-Routen
|
||||
|
|
@ -55,7 +55,8 @@ if (\App\Domain\EarlyDomainParser::getCurrentDomainType() === 'checkout') {
|
|||
|
||||
// File storage route für alle Domains (Rechnungen, Downloads, etc.)
|
||||
// Auth-Prüfung erfolgt im FileController selbst je nach Kontext
|
||||
Route::get('/storage/file/{id}/{from}/{do?}', 'FileController@show')->name('storage_file');
|
||||
// Optional: locale Parameter für mehrsprachige PDFs (z.B. /storage/file/123/invoice/download/es)
|
||||
Route::get('/storage/file/{id}/{from}/{do?}/{locale?}', 'FileController@show')->name('storage_file');
|
||||
|
||||
// Sprachwechsler
|
||||
Route::post('/change_website_lang', 'Web\SiteController@changeLang')->name('language.change');
|
||||
|
|
@ -76,11 +77,10 @@ Route::get('translation/{locale}', function ($locale) {
|
|||
return redirect()->back();
|
||||
})->name('translation');
|
||||
|
||||
|
||||
// Bild-Routen (aus alter utility.php wiederhergestellt)
|
||||
Route::get('/product/image/{slug}', function ($slug = null) {
|
||||
if ($image = \App\Models\ProductImage::where('slug', 'like', $slug)->first()) {
|
||||
$path = storage_path('app/public') . '/images/product' . '/' . $image->product_id . '/' . $image->filename;
|
||||
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return response()->file($path);
|
||||
}
|
||||
|
|
@ -91,7 +91,7 @@ Route::get('/product/image/{slug}', function ($slug = null) {
|
|||
Route::get('storage/images/{from}/{slug}', function ($from = null, $slug = null) {
|
||||
if ($from == 'shop') {
|
||||
if ($image = \App\Models\UserShop::where('filename', $slug)->first()) {
|
||||
$path = storage_path('app/public') . '/images/shop' . '/' . $image->filename;
|
||||
$path = storage_path('app/public').'/images/shop'.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
|
|
@ -99,10 +99,9 @@ Route::get('storage/images/{from}/{slug}', function ($from = null, $slug = null)
|
|||
}
|
||||
})->name('storage_images');
|
||||
|
||||
|
||||
Route::get('/iq/image/{slug}', function ($slug = null) {
|
||||
if ($image = \App\Models\IqImage::where('slug', $slug)->first()) {
|
||||
$path = storage_path('app/public') . '/images/iq_images/' . $image->filename;
|
||||
$path = storage_path('app/public').'/images/iq_images/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
|
|
@ -111,7 +110,7 @@ Route::get('/iq/image/{slug}', function ($slug = null) {
|
|||
|
||||
Route::get('/user_shop/image/{slug}', function ($slug = null) {
|
||||
if ($image = \App\Models\UserShopOnSite::where('slug', $slug)->first()) {
|
||||
$path = storage_path('app/public') . '/images/user_shop' . '/' . $image->user_shop_id . '/' . $image->filename;
|
||||
$path = storage_path('app/public').'/images/user_shop'.'/'.$image->user_shop_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
|
|
@ -120,7 +119,7 @@ Route::get('/user_shop/image/{slug}', function ($slug = null) {
|
|||
|
||||
Route::get('/shop/product/image/{slug}', function ($slug = null) {
|
||||
if ($image = \App\Models\ProductImage::where('slug', $slug)->first()) {
|
||||
$path = storage_path('app/public') . '/images/product' . '/' . $image->product_id . '/' . $image->filename;
|
||||
$path = storage_path('app/public').'/images/product'.'/'.$image->product_id.'/'.$image->filename;
|
||||
if (file_exists($path)) {
|
||||
return Response::file($path);
|
||||
}
|
||||
|
|
@ -134,32 +133,34 @@ if (\App\Domain\EarlyDomainParser::getCurrentDomainType() !== 'checkout') {
|
|||
// Checkout-Domain aus Config laden
|
||||
$checkoutHost = config('domains.domains.checkout.host');
|
||||
$protocol = config('domains.protocol', 'https://');
|
||||
$checkoutBaseUrl = $protocol . $checkoutHost;
|
||||
$checkoutBaseUrl = $protocol.$checkoutHost;
|
||||
|
||||
Route::get('/checkout/card/{identifier?}', function ($identifier = null) use ($checkoutBaseUrl) {
|
||||
$path = '/checkout/card/' . ($identifier ?: '');
|
||||
return redirect()->away($checkoutBaseUrl . $path);
|
||||
$path = '/checkout/card/'.($identifier ?: '');
|
||||
|
||||
return redirect()->away($checkoutBaseUrl.$path);
|
||||
})->name('checkout.checkout_card');
|
||||
|
||||
Route::post('/checkout/card/final', function () use ($checkoutBaseUrl) {
|
||||
return redirect()->away($checkoutBaseUrl . '/checkout/card/final');
|
||||
return redirect()->away($checkoutBaseUrl.'/checkout/card/final');
|
||||
})->name('checkout.checkout_card_final');
|
||||
|
||||
// Weiterleitung für Transaktionsstatus
|
||||
Route::get('/transaction/status/{status?}/{reference?}', function ($status = null, $reference = null) use ($checkoutBaseUrl) {
|
||||
$path = "/transaction/status/" . ($status ?: '') . "/" . ($reference ?: '');
|
||||
return redirect()->away($checkoutBaseUrl . $path);
|
||||
$path = '/transaction/status/'.($status ?: '').'/'.($reference ?: '');
|
||||
|
||||
return redirect()->away($checkoutBaseUrl.$path);
|
||||
})->name('checkout.transaction_status');
|
||||
|
||||
Route::post('/transaction/status/{status?}/{reference?}', function ($status = null, $reference = null) use ($checkoutBaseUrl) {
|
||||
$path = "/transaction/status/" . ($status ?: '') . "/" . ($reference ?: '');
|
||||
return redirect()->away($checkoutBaseUrl . $path);
|
||||
$path = '/transaction/status/'.($status ?: '').'/'.($reference ?: '');
|
||||
|
||||
return redirect()->away($checkoutBaseUrl.$path);
|
||||
})->name('checkout.transaction_status_post');
|
||||
|
||||
Route::get('/transaction/approved/{transactionId}/{reference}', function ($transactionId, $reference) use ($checkoutBaseUrl) {
|
||||
return redirect()->away($checkoutBaseUrl . "/transaction/approved/{$transactionId}/{$reference}");
|
||||
return redirect()->away($checkoutBaseUrl."/transaction/approved/{$transactionId}/{$reference}");
|
||||
})->name('checkout.transaction_approved');
|
||||
}
|
||||
|
||||
|
||||
Route::get('/register/verify/{confirmationCode}', 'HomeController@verify')->name('register_verify');
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue