'ZEmailnator', 'app_base_url' => 'http://localhost:8000', 'app_title' => 'ZEmailnator - Temporary Email Service', 'app_description' => 'Create temporary email addresses instantly', 'app_keyword' => 'temp email, disposable email, fake email', 'app_meta' => json_encode([ 'author' => 'ZEmailnator', 'robots' => 'index, follow', ]), 'imap_settings' => json_encode([ 'host' => 'imap.gmail.com', 'port' => 993, 'protocol' => 'imap', 'encryption' => 'ssl', 'validate_cert' => true, 'username' => 'test@gmail.com', 'password' => 'password', ]), 'configuration_settings' => json_encode([ 'custom_username_length_min' => 3, 'custom_username_length_max' => 20, 'random_username_length_min' => 6, 'random_username_length_max' => 12, 'forbidden_ids' => ['admin', 'root', 'test'], 'gmailUsernames' => ['john.doe', 'jane.smith'], 'outlookUsernames' => ['outlookuser', 'testuser'], 'domains' => ['gmail.com', 'outlook.com', 'example.com'], 'enable_create_from_url' => true, 'disable_mailbox_slug' => false, 'fetch_messages_limit' => 15, 'blocked_domains' => ['spam.com', 'blocked.com'], 'date_format' => 'd M Y h:i A', 'add_mail_in_title' => false, 'fetch_seconds' => 30, ]), 'ads_settings' => json_encode([ 'enabled' => false, 'provider' => 'google', 'one' => '', 'two' => '', ]), ]; // Try to load data from database, but fail gracefully if tables don't exist try { $menus = cache()->remember('app_menus', now()->addHours(6), function () { return Menu::all(); }); $blogs = cache()->remember('app_blogs', now()->addHours(6), function () { return Blog::where('is_published', 1)->get(); }); $plans = cache()->remember('app_plans', now()->addHours(6), function () { return Plan::all(); }); } catch (\Exception $e) { // Set empty collections if database tables don't exist $menus = collect(); $blogs = collect(); $plans = collect(); } // Ensure we always have collections, even if cache is empty if (!($menus instanceof \Illuminate\Support\Collection)) { $menus = collect(); } if (!($blogs instanceof \Illuminate\Support\Collection)) { $blogs = collect(); } if (!($plans instanceof \Illuminate\Support\Collection)) { $plans = collect(); } config(['app.settings' => $settings]); config(['app.menus' => $menus]); config(['app.blogs' => $blogs]); config(['app.plans' => $plans]); } }