commit 08-2025

This commit is contained in:
Kevin Adametz 2025-08-12 18:01:59 +02:00
parent 9ae662f63e
commit 480fdc65ed
404 changed files with 65310 additions and 2600431 deletions

View file

@ -4,6 +4,7 @@ namespace App\Providers;
use Illuminate\Support\Facades\Schema;
use Illuminate\Support\ServiceProvider;
use Illuminate\Support\Facades\URL;
class AppServiceProvider extends ServiceProvider
{
@ -15,6 +16,29 @@ class AppServiceProvider extends ServiceProvider
public function boot()
{
Schema::defaultStringLength(191);
if ($this->app->environment('production')) {
URL::forceScheme('https');
}
// Domain-bewusster View Composer für user_shop
\View::composer('*', function ($view) {
try {
$context = app(\App\Domain\DomainContext::class);
// Für die Main-Domain: user_shop immer auf null setzen
if ($context->type === 'main') {
$view->with('user_shop', null);
} else {
// Für alle anderen Domains: normales Verhalten
$userShop = $context->userShop ?? \App\Services\Util::getUserShop();
$view->with('user_shop', $userShop);
}
} catch (\Exception $e) {
// Fallback bei Fehlern
$view->with('user_shop', \App\Services\Util::getUserShop());
}
});
}
/**