芝麻web文件管理V1.00
编辑当前文件:/home/qrafawbu/store.kwesioben.com/app/Http/Controllers/api/v1/ConfigController.php
$social['login_medium'], 'status' => (boolean)$social['status'] ]; array_push($social_login, $config); } foreach (Helpers::get_business_settings('apple_login') as $social) { $config = [ 'login_medium' => $social['login_medium'], 'status' => (boolean)$social['status'] ]; array_push($social_login, $config); } $languages = Helpers::get_business_settings('pnc_language'); $lang_array = []; foreach ($languages as $language) { array_push($lang_array, [ 'code' => $language, 'name' => Helpers::get_language_name($language) ]); } $offline_payment = null; $offline_payment_status = Helpers::get_business_settings('offline_payment')['status'] == 1 ?? 0; if($offline_payment_status){ $offline_payment = [ 'name' => 'offline_payment', 'image' => asset('public/assets/back-end/img/pay-offline.png'), ]; } $payment_methods = payment_gateways(); $payment_methods->map(function ($payment) { $payment->additional_datas = json_decode($payment->additional_data); unset( $payment->additional_data, $payment->live_values, $payment->test_values, $payment->id, $payment->settings_type, $payment->mode, $payment->is_active, $payment->created_at, $payment->updated_at ); }); $admin_shipping = ShippingType::where('seller_id',0)->first(); $shipping_type = isset($admin_shipping)==true?$admin_shipping->shipping_type:'order_wise'; $company_logo = asset("storage/app/public/company/").'/'.BusinessSetting::where(['type'=>'company_web_logo'])->first()->value; return response()->json([ 'brand_setting' => BusinessSetting::where('type', 'product_brand')->first()->value, 'digital_product_setting' => BusinessSetting::where('type', 'digital_product')->first()->value, 'system_default_currency' => (int)Helpers::get_business_settings('system_default_currency'), 'digital_payment' => (boolean)Helpers::get_business_settings('digital_payment')['status'] ?? 0, 'cash_on_delivery' => (boolean)Helpers::get_business_settings('cash_on_delivery')['status'] ?? 0, 'seller_registration' => BusinessSetting::where('type', 'seller_registration')->first()->value, 'pos_active' => BusinessSetting::where('type','seller_pos')->first()->value, 'company_phone' => Helpers::get_business_settings('company_phone'), 'company_email' => Helpers::get_business_settings('company_email'), 'company_logo' => $company_logo, 'delivery_country_restriction' => Helpers::get_business_settings('delivery_country_restriction'), 'delivery_zip_code_area_restriction' => Helpers::get_business_settings('delivery_zip_code_area_restriction'), 'base_urls' => [ 'product_image_url' => ProductManager::product_image_path('product'), 'product_thumbnail_url' => ProductManager::product_image_path('thumbnail'), 'digital_product_url' => asset('storage/app/public/product/digital-product'), 'brand_image_url' => asset('storage/app/public/brand'), 'customer_image_url' => asset('storage/app/public/profile'), 'banner_image_url' => asset('storage/app/public/banner'), 'category_image_url' => asset('storage/app/public/category'), 'review_image_url' => asset('storage/app/public'), 'seller_image_url' => asset('storage/app/public/seller'), 'shop_image_url' => asset('storage/app/public/shop'), 'notification_image_url' => asset('storage/app/public/notification'), 'delivery_man_image_url' => asset('storage/app/public/delivery-man'), ], 'static_urls' => [ 'contact_us' => route('contacts'), 'brands' => route('brands'), 'categories' => route('categories'), 'customer_account' => route('user-account'), ], 'about_us' => Helpers::get_business_settings('about_us'), 'privacy_policy' => Helpers::get_business_settings('privacy_policy'), 'faq' => HelpTopic::all(), 'terms_&_conditions' => Helpers::get_business_settings('terms_condition'), 'refund_policy' => Helpers::get_business_settings('refund-policy'), 'return_policy' => Helpers::get_business_settings('return-policy'), 'cancellation_policy' => Helpers::get_business_settings('cancellation-policy'), 'currency_list' => $currency, 'currency_symbol_position' => Helpers::get_business_settings('currency_symbol_position') ?? 'right', 'business_mode'=> Helpers::get_business_settings('business_mode'), 'maintenance_mode' => (boolean)Helpers::get_business_settings('maintenance_mode') ?? 0, 'language' => $lang_array, 'colors' => Color::all(), 'unit' => Helpers::units(), 'shipping_method' => Helpers::get_business_settings('shipping_method'), 'email_verification' => (boolean)Helpers::get_business_settings('email_verification'), 'phone_verification' => (boolean)Helpers::get_business_settings('phone_verification'), 'country_code' => Helpers::get_business_settings('country_code'), 'social_login' => $social_login, 'currency_model' => Helpers::get_business_settings('currency_model'), 'forgot_password_verification' => Helpers::get_business_settings('forgot_password_verification'), 'announcement'=> Helpers::get_business_settings('announcement'), 'pixel_analytics'=> Helpers::get_business_settings('pixel_analytics'), 'software_version'=>env('SOFTWARE_VERSION'), 'decimal_point_settings'=>Helpers::get_business_settings('decimal_point_settings'), 'inhouse_selected_shipping_type'=>$shipping_type, 'billing_input_by_customer'=>Helpers::get_business_settings('billing_input_by_customer'), 'minimum_order_limit'=>Helpers::get_business_settings('minimum_order_limit'), 'wallet_status'=>Helpers::get_business_settings('wallet_status'), 'loyalty_point_status'=>Helpers::get_business_settings('loyalty_point_status'), 'loyalty_point_exchange_rate'=>Helpers::get_business_settings('loyalty_point_exchange_rate'), 'loyalty_point_minimum_point'=>Helpers::get_business_settings('loyalty_point_minimum_point'), 'payment_methods' => $payment_methods, 'offline_payment' => $offline_payment, 'payment_method_image_path' => asset('storage/app/public/payment_modules/gateway_image'), 'ref_earning_status' => BusinessSetting::where('type', 'ref_earning_status')->first()->value ?? 0, 'active_theme' => theme_root_path(), 'popular_tags'=>Tag::orderBy('visit_count', 'desc')->take(15)->get(), 'guest_checkout'=>Helpers::get_business_settings('guest_checkout'), 'upload_picture_on_delivery'=>Helpers::get_business_settings('upload_picture_on_delivery'), 'user_app_version_control'=>Helpers::get_business_settings('user_app_version_control'), 'seller_app_version_control'=>Helpers::get_business_settings('seller_app_version_control'), 'delivery_man_app_version_control'=>Helpers::get_business_settings('delivery_man_app_version_control'), 'add_funds_to_wallet'=>Helpers::get_business_settings('add_funds_to_wallet'), 'minimum_add_fund_amount'=>Helpers::get_business_settings('minimum_add_fund_amount'), 'maximum_add_fund_amount'=>Helpers::get_business_settings('maximum_add_fund_amount'), 'inhouse_temporary_close'=>Helpers::get_business_settings('temporary_close'), 'inhouse_vacation_add'=>Helpers::get_business_settings('vacation_add'), 'free_delivery_status'=>Helpers::get_business_settings('free_delivery_status'), 'free_delivery_over_amount'=>Helpers::get_business_settings('free_delivery_over_amount'), 'free_delivery_responsibility'=>Helpers::get_business_settings('free_delivery_responsibility'), 'free_delivery_over_amount_seller'=>Helpers::get_business_settings('free_delivery_over_amount_seller'), 'minimum_order_amount_status'=> Helpers::get_business_settings('minimum_order_amount_status'), 'minimum_order_amount'=> Helpers::get_business_settings('minimum_order_amount'), 'minimum_order_amount_by_seller'=> Helpers::get_business_settings('minimum_order_amount_by_seller'), 'order_verification'=> Helpers::get_business_settings('order_verification'), 'referral_customer_signup_url'=> route('home').'?referral_code=', ]); } }