@php $profile = \Modules\Auth\Models\Profile::first(); @endphp {{-- Brand Name --}} Cargoaim {{-- --}} {{-- Mega Menu Dropdown Start --}} @foreach ($menus as $menu) @php $menuUrl = $menu->url ?? ($menu->route ? route($menu->route) : '#'); $isMenuActive = request()->is(ltrim(parse_url($menuUrl, PHP_URL_PATH), '/')); @endphp {{ $menu->title }} @if ($menu->children->isNotEmpty()) @endif @if ($menu->children->isNotEmpty()) @foreach ($menu->children as $child) @php $childUrl = $child->url ?? ($child->route ? route($child->route) : '#'); $isChildActive = request()->is(ltrim(parse_url($childUrl, PHP_URL_PATH), '/')); @endphp {{-- Assuming $child->icon exists --}} {{ $child->title }} {{-- Assuming $child->children exists --}} @if ($child->children && $child->children->isNotEmpty()) @endif @if ($child->children && $child->children->isNotEmpty()) @foreach ($child->children as $nested) @php $nestedUrl = $nested->url ?? ($nested->route ? route($nested->route) : '#'); $isNestedActive = request()->is(ltrim(parse_url($nestedUrl, PHP_URL_PATH), '/')); @endphp {{ $nested->title }} @endforeach @endif @endforeach @endif @endforeach {{-- Mega Menu Dropdown End --}} @php use Illuminate\Support\Facades\DB; use Illuminate\Support\Facades\Auth; $excludedColumns = ['row_id', 'module', 'apply_on_type', 'message_id_to_call', 'remarks', 'created_at', 'updated_at']; $table = 'language'; $database = DB::getDatabaseName(); $columns = DB::select(" SELECT COLUMN_NAME, COLUMN_COMMENT FROM information_schema.COLUMNS WHERE TABLE_SCHEMA = ? AND TABLE_NAME = ? ORDER BY ORDINAL_POSITION ", [$database, $table]); $user = Auth::guard('web')->user(); // ইউজারের ভাষা থেকে ফ্ল্যাগ ফাইল খোঁজা $userLang = $user->user_language ?? 'en'; // ডিফল্ট en $flag = 'default.png'; $extensions = ['svg', 'png', 'jpg']; foreach ($extensions as $ext) { $relativePath = "backend/assets/images/flags/{$userLang}.{$ext}"; if (file_exists(public_path($relativePath))) { $flag = "{$userLang}.{$ext}"; break; } } $flagUrl = asset("backend/assets/images/flags/" . $flag); @endphp @foreach ($columns as $column) @if (!in_array($column->COLUMN_NAME, $excludedColumns)) @php $firstWord = explode(' ', trim($column->COLUMN_COMMENT))[0]; $flag = 'default.png'; $columnName = $column->COLUMN_NAME; foreach ($extensions as $ext) { $relativePath = "backend/assets/images/flags/{$columnName}.{$ext}"; if (file_exists(public_path($relativePath))) { $flag = "{$columnName}.{$ext}"; break; } } $flagUrl = asset("backend/assets/images/flags/" . $flag); @endphp {{ $firstWord }} @endif @endforeach Notifications {{-- Mark as Read Delete All Do not Disturb Other Settings --}} {{-- --}} unread messages Glady Haid commented on paces admin status 25m ago {{-- --}} unread messages Tommy Berry donated $100.00 for Carbon removal program 58m ago You withdraw a $500 by New York ATM 2h ago {{-- --}} unread messages Richard Allen followed you in Facebook 3h ago {{-- --}} unread messages Victor Collier liked you recent photo in Instagram 10h ago Hey! 👋 You have no any notifications View All {{-- --}} {{ auth()->user()->userFullName }} {{ auth()->user()->userOfficeEmail }} Welcome ! My Profile Theme Color Language Settings Sign Out @csrf