@php $all_cards = [ ['perm' => 'p_users', 'route' => route('admin.users.index'), 'icon' => 'fa-users', 'color' => '#7367F0', 'title' => 'Total Users', 'count' => $total_users], ['perm' => 'p_addmoney', 'route' => route('admin.transactions.index', ['type' => 'addmoney']), 'icon' => 'fa-wallet', 'color' => '#28C76F', 'title' => 'Pending Deposit', 'count' => $pending_addmoney], ['perm' => 'p_withdraw', 'route' => route('admin.transactions.index', ['type' => 'withdraw']), 'icon' => 'fa-hand-holding-dollar', 'color' => '#EA5455', 'title' => 'Pending Withdraw', 'count' => $pending_withdraw], ['perm' => 'p_sliders', 'route' => route('admin.sliders.index'), 'icon' => 'fa-images', 'color' => '#9b59b6', 'title' => 'Manage Sliders'], // এখানে p_match পারমিশনের মাধ্যমে Match Category দেওয়া হলো ['perm' => 'p_matches', 'route' => url('/admin/match-category'), 'icon' => 'fa-layer-group', 'color' => '#00CFE8', 'title' => 'Match Category'], ['perm' => 'p_diamonds', 'route' => url('/admin/add-diamond'), 'icon' => 'fa-gem', 'color' => '#00bfff', 'title' => 'Diamonds'], ['perm' => 'p_rules', 'route' => url('/admin/imghost'), 'icon' => 'fa-image', 'color' => '#e84393', 'title' => 'Image Host'], ['perm' => 'p_settings', 'route' => route('admin.settings.index'), 'icon' => 'fa-cog', 'color' => '#827E92', 'title' => 'App Settings'], ['perm' => 'only_admin', 'route' => url('/admin/terms'), 'icon' => 'fa-file-contract', 'color' => '#1dd1a1', 'title' => 'App Terms'], ['perm' => 'p_notifications', 'route' => route('admin.notifications.form'), 'icon' => 'fa-bell', 'color' => '#E91E63', 'title' => 'Notifications'], ['perm' => 'p_aisettings', 'route' => route('admin.aisettings.index'), 'icon' => 'fa-robot', 'color' => '#00FFCC', 'title' => 'AI Settings'], ['perm' => 'p_orders', 'route' => url('/admin/orders'), 'icon' => 'fa-shopping-cart', 'color' => '#ff6b6b', 'title' => 'Topup Orders'], ['perm' => 'p_support_ss', 'route' => url('/admin/support-ss'), 'icon' => 'fa-camera', 'color' => '#20c997', 'title' => 'Support SS'], ['perm' => 'only_admin', 'route' => url('/admin/moderators'), 'icon' => 'fa-user-shield', 'color' => '#e67e22', 'title' => 'Moderators'] ]; if (session()->has('is_moderator')) { $mod_username = session('moderator_username'); $user_perm = \Illuminate\Support\Facades\DB::table('tn_modaretor')->where('username', $mod_username)->first(); $filtered_cards = array_filter($all_cards, function($card) use ($user_perm) { $permission_field = $card['perm']; return isset($user_perm->$permission_field) && $user_perm->$permission_field == 1; }); $cards = array_values($filtered_cards); } else { $cards = $all_cards; } @endphp @foreach ($cards as $i => $card)
@if (isset($card['count']))

{{ $card['count'] }}

@endif

{{ $card['title'] }}

@endforeach
Home Users Match Category Options