@include('layouts.partials.assets') @php $adminRole = auth('admin')->user()->role ?? null; $queuePending = null; $queueFailed = null; $webhookBots = null; $webhookHealthy = null; if (\Illuminate\Support\Facades\Schema::hasTable('jobs')) { $queuePending = (int) \Illuminate\Support\Facades\DB::table('jobs')->count(); } if (\Illuminate\Support\Facades\Schema::hasTable('failed_jobs')) { $queueFailed = (int) \Illuminate\Support\Facades\DB::table('failed_jobs')->count(); } if (\Illuminate\Support\Facades\Schema::hasTable('bot_accounts')) { $webhookBots = (int) \Illuminate\Support\Facades\DB::table('bot_accounts') ->where('is_active', true) ->where('mode', 'webhook') ->count(); $webhookHealthy = (int) \Illuminate\Support\Facades\DB::table('bot_accounts') ->where('is_active', true) ->where('mode', 'webhook') ->whereNotNull('last_webhook_received_at') ->where('last_webhook_received_at', '>=', now()->subHours(2)) ->count(); } $webhookReadiness = \App\Support\WebhookReadiness::assess(); $links = [ ['title' => 'اصلی', 'items' => [ ['label' => 'داشبورد', 'route' => 'admin.dashboard'], ['label' => 'کاربران ادمین', 'route' => 'admin.admin-users.index', 'roles' => ['super_admin']], ['label' => 'کاربران', 'route' => 'admin.users.index'], ]], ['title' => 'ربات و گروه', 'items' => [ ['label' => 'ربات‌ها', 'route' => 'admin.bots.index'], ['label' => 'چت‌های پلتفرم', 'route' => 'admin.platform-chats.index'], ['label' => 'شناسه‌های کانال', 'route' => 'admin.channel-identities.index'], ['label' => 'دکمه‌های ربات', 'route' => 'admin.bot-buttons.index'], ['label' => 'چیدمان کیبورد', 'route' => 'admin.bot-keyboard-layouts.index'], ['label' => 'استقرار کیبورد', 'route' => 'admin.bot-keyboard-deployments.index'], ['label' => 'گروه‌های یکپارچه', 'route' => 'admin.unified-groups.index'], ]], ['title' => 'پردازش', 'items' => [ ['label' => 'ارائه‌دهنده‌های هوش مصنوعی', 'route' => 'admin.ai-providers.index'], ['label' => 'اجراهای دستی', 'route' => 'admin.manual-runs.index'], ['label' => 'پایش جاب‌ها', 'route' => 'admin.jobs.index'], ['label' => 'لاگ تطبیق', 'route' => 'admin.match-logs.index'], ]], ['title' => 'امنیت و تنظیمات', 'items' => [ ['label' => 'تنظیمات', 'route' => 'admin.settings.index', 'roles' => ['super_admin']], ['label' => 'لاگ‌های ممیزی', 'route' => 'admin.audit-logs.index'], ]], ]; @endphp

پلتفرم

مدیریت ربات‌های چراغ برق

پنل ادمین

@yield('title', 'داشبورد')

نقش: {{ $adminRole ?? 'مدیر' }}
@csrf
@if(!$webhookReadiness['ok'])

هشدار آمادگی Webhook

    @foreach($webhookReadiness['messages'] as $message)
  • {{ $message }}
  • @endforeach
@endif @if(session('status'))
{{ session('status') }}
@endif @if(session('error'))
{{ session('error') }}
@endif @if($errors->any())
{{ $errors->first() }}
@endif @yield('content')