@php use Illuminate\Support\Str; $tenantId = $tenantId ?? (tenant() ? tenant('id') : null); $scope = $scope ?? ($tenantId ? 'tenant' : 'platform'); $mode = $mode ?? 'auth'; $tenantBaseUrl = tenant_base_url(); $basePath = $basePath ?? $tenantBaseUrl; $isAppMode = $mode === 'app'; $isAuthenticated = $scope === 'tenant' ? auth('tenant')->check() : auth('web')->check(); $currentUser = $scope === 'tenant' ? auth('tenant')->user() : auth('web')->user(); $searchAction = $searchAction ?? ($isAppMode && $scope === 'tenant' ? tenant_url(null, 'search') : null); $menuItems = $tenantMenus ?? ($tenantSiteSettings?->effectiveMenus() ?? []); $siteName = $siteName ?? ($tenantSiteSettings?->site_name ?? 'qpost'); $logoUrl = $tenantId ? tenant_file_url($tenantSiteSettings?->logo_path) : null; $toTenantUrl = static function (string $href) use ($basePath): string { $href = trim($href); if ($href === '') { return '#'; } if (Str::startsWith($href, ['http://', 'https://', '//', '#'])) { return $href; } return rtrim($basePath, '/') . '/' . ltrim($href, '/'); }; @endphp
@if ($logoUrl) @else {{ mb_substr($siteName, 0, 1) }} {{ $siteName }} @endif @if ($scope === 'platform')
게시판 회원관리 @if ($isAuthenticated) {{ $currentUser?->name }}
@csrf 로그아웃
@else 로그인 @endif
@elseif ($isAppMode)
@if ($isAuthenticated) @else @endif
@else @endif