⚝
One Hat Cyber Team
⚝
Your IP:
216.73.216.45
Server IP:
185.238.29.86
Server:
Linux server2 6.8.12-6-pve #1 SMP PREEMPT_DYNAMIC PMX 6.8.12-6 (2024-12-19T19:05Z) x86_64
Server Software:
nginx/1.18.0
PHP Version:
8.1.31
Buat File
|
Buat Folder
Eksekusi
Dir :
~
/
var
/
www
/
dnc
/
@core
/
app
/
Http
/
Controllers
/
View File Name :
HomePageController.php
<?php namespace App\Http\Controllers; use App\Language; use App\StaticOption; use Illuminate\Http\Request; class HomePageController extends Controller { public function __construct() { $this->middleware('auth:admin'); } public function header_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.header')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function header_area_update(Request $request) { $home_page_variant = get_static_option('home_page_variant'); $this->validate($request, [ 'home_page_header_bg_image' => 'nullable|string', 'home_page_header_button_status' => 'nullable|string', 'home_page_header_bottom_image' => 'nullable|string', 'home_page_header_right_image' => 'nullable|string', 'home_page_header_shape_bike' => 'nullable|string', 'home_page_header_shape_circle' => 'nullable|string', 'home_page_header_shape_ballon_1' => 'nullable|string', 'home_page_header_shape_ballon_2' => 'nullable|string', 'home_page_header_shape_ballon_3' => 'nullable|string', 'home_page_header_shape_leaf_1' => 'nullable|string', 'home_page_header_shape_leaf_2' => 'nullable|string', 'home_page_header_shape_leaf_3' => 'nullable|string', 'home_page_header_shape_leaf_4' => 'nullable|string', 'home_page_header_shape_leaf_5' => 'nullable|string', 'home_page_header_shape_leaf_6' => 'nullable|string', 'home_page_header_shape_food_1' => 'nullable|string', 'home_page_header_shape_food_2' => 'nullable|string', 'home_page_header_shape_food_3' => 'nullable|string', 'home_page_header_shape_food_4' => 'nullable|string', 'home_page_header_title_texture' => 'nullable|string', 'home_page_header_app_store_status_1' => 'nullable|string', 'home_page_header_app_store_logo_1' => 'nullable|string', 'home_page_header_app_store_url_1' => 'nullable|string', 'home_page_header_app_store_status_2' => 'nullable|string', 'home_page_header_app_store_logo_2' => 'nullable|string', 'home_page_header_app_store_url_2' => 'nullable|string', 'home_page_header_animate_texture' => 'nullable|string', 'home_page_header_texture_1' => 'nullable|string', 'home_page_header_texture_2' => 'nullable|string', 'home_page_header_texture_3' => 'nullable|string', 'home_page_header_texture_4' => 'nullable|string', 'home_page_header_right_section_image' => 'nullable|string', 'home_page_11_header_section_image' => 'nullable|string', ]); $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_header_' . $lang->slug . '_title' => 'nullable|string', 'home_page_header_' . $lang->slug . '_heading_title' => 'nullable|string', 'home_page_header_' . $lang->slug . '_subtitle' => 'nullable|string', 'home_page_header_' . $lang->slug . '_description' => 'nullable|string', 'home_page_header_btn_' . $lang->slug . '_text' => 'nullable|string', 'home_page_header_btn_' . $lang->slug . '_url' => 'nullable|string', 'home_page_header_btn_' . $lang->slug . '_text_2' => 'nullable|string', 'home_page_header_btn_' . $lang->slug . '_url_2' => 'nullable|string', 'header_intro_video_' . $lang->slug . '_text' => 'nullable|string', 'header_intro_video_' . $lang->slug . '_url' => 'nullable|string', 'home_page_header_app_' . $lang->slug . '_title_1'=> 'nullable|string', 'home_page_header_app_' . $lang->slug . '_icon_1'=> 'nullable|string', 'home_page_header_app_' . $lang->slug . '_title_2'=> 'nullable|string', 'home_page_header_app_' . $lang->slug . '_icon_2'=> 'nullable|string', 'home_page_header_app_' . $lang->slug . '_title_3'=> 'nullable|string', 'home_page_header_app_' . $lang->slug . '_icon_3'=> 'nullable|string', ]); $fields = [ 'home_page_header_' . $lang->slug . '_title', 'home_page_header_' . $lang->slug . '_heading_title', 'home_page_header_' . $lang->slug . '_subtitle', 'home_page_header_' . $lang->slug . '_description', 'home_page_header_btn_' . $lang->slug . '_text', 'home_page_header_btn_' . $lang->slug . '_url', 'home_page_header_btn_' . $lang->slug . '_text_2', 'home_page_header_btn_' . $lang->slug . '_url_2', 'header_intro_video_' . $lang->slug . '_text', 'header_intro_video_' . $lang->slug . '_url', 'home_page_header_app_' . $lang->slug . '_title_1', 'home_page_header_app_' . $lang->slug . '_icon_1', 'home_page_header_app_' . $lang->slug . '_title_2', 'home_page_header_app_' . $lang->slug . '_icon_2', 'home_page_header_app_' . $lang->slug . '_title_3', 'home_page_header_app_' . $lang->slug . '_icon_3', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } $fields = [ 'home_page_header_bg_image', 'home_page_header_bottom_image', 'home_page_header_right_image', 'home_page_header_shape_bike', 'home_page_header_shape_circle', 'home_page_header_shape_ballon_1', 'home_page_header_shape_ballon_2', 'home_page_header_shape_ballon_3', 'home_page_header_shape_leaf_1', 'home_page_header_shape_leaf_2', 'home_page_header_shape_leaf_3', 'home_page_header_shape_leaf_4', 'home_page_header_shape_leaf_5', 'home_page_header_shape_leaf_6', 'home_page_header_shape_food_1', 'home_page_header_shape_food_2', 'home_page_header_shape_food_3', 'home_page_header_shape_food_4', 'home_page_header_title_texture', 'home_page_header_app_store_logo_1', 'home_page_header_app_store_url_1', 'home_page_header_app_store_logo_2', 'home_page_header_app_store_url_2', 'home_page_header_animate_texture', 'home_page_header_texture_1', 'home_page_header_texture_2', 'home_page_header_texture_3', 'home_page_header_texture_4', 'home_page_header_right_section_image', 'home_page_11_header_section_image', 'header_social_icon_1', 'header_social_icon_2', 'header_social_icon_3', 'header_social_icon_4', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } update_static_option('home_page_header_bg_image_' . $home_page_variant, $request->home_page_header_bg_image); update_static_option('home_page_header_right_image_' . $home_page_variant, $request->home_page_header_right_image); if($home_page_variant != '02'){ update_static_option('header_intro_video_status', $request->header_intro_video_status); } if($home_page_variant != '07'){ update_static_option('home_page_header_button_status', $request->home_page_header_button_status); }else{ update_static_option('home_page_header_app_store_status_1', $request->home_page_header_app_store_status_1); update_static_option('home_page_header_app_store_status_2', $request->home_page_header_app_store_status_2); } if($home_page_variant == '11'){ update_static_option('home_page_header_button_status_2', $request->home_page_header_button_status_2); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function brand_logos_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.brand-logos-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function update_brand_logos_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'brand_' . $lang->slug . '_title' => 'nullable|string', ]); $fields = [ 'brand_' . $lang->slug . '_title' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } return redirect()->back()->with(['msg' => __('Brands Title Updated...'), 'type' => 'success']); } public function testimonial_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.testimonial-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function update_testimonial_area(Request $request) { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); $this->validate($request, [ 'home_page_testimonial_bg_image' => 'nullable|string', 'home_page_testimonial_texture_image' => 'nullable|string' ]); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_testimonial_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_testimonial_section_' . $lang->slug . '_description' => 'nullable|string', 'home_page_testimonial_section_' . $lang->slug . '_subtitle' => 'nullable|string', ]); $fields = [ 'home_page_testimonial_section_' . $lang->slug . '_title', 'home_page_testimonial_section_' . $lang->slug . '_description', 'home_page_testimonial_section_' . $lang->slug . '_subtitle', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_testimonial_bg_image_' . $home_page_variant, $request->home_page_testimonial_bg_image); if ($home_page_variant == "03") { update_static_option('home_page_testimonial_texture_image', $request->home_page_testimonial_texture_image); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function faq_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.faq-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function update_faq_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_faq_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_faq_section_' . $lang->slug . '_description' => 'nullable|string', ]); $fields = [ 'home_page_faq_section_' . $lang->slug . '_title', 'home_page_faq_section_' . $lang->slug . '_description' ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function keyfeatures_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.key-features-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant, ]); } public function update_keyfeatures_area(Request $request) { $all_languages = Language::all(); $home_variant = get_static_option('home_page_variant'); $this->validate($request, [ 'home_page_'.$home_variant.'_feature_items' => 'nullable|string', 'home_page_06_features_bg' => 'nullable|string', 'home_page_08_features_bg' => 'nullable|string', 'home_page_09_features_bg' => 'nullable|string', 'home_page_06_features_bg_2' => 'nullable|string', 'home_page_06_features_leaf_1' => 'nullable|string', 'home_page_06_features_leaf_2' => 'nullable|string', 'home_page_food_order_texture_1' => 'nullable|string', 'home_page_food_order_texture_2' => 'nullable|string', 'home_page_food_order_texture_3' => 'nullable|string', 'home_page_food_order_texture_4' => 'nullable|string', 'home_page_10_bg_texture' => 'nullable|string', 'home_page_10_features_bg' => 'nullable|string', 'home_page_10_create_content_img' => 'nullable|string', ]); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_keyfeatures_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_keyfeatures_section_create_content_' . $lang->slug . '_title' => 'nullable|string', 'home_page_keyfeatures_section_' . $lang->slug . '_subtitle' => 'nullable|string', 'home_page_keyfeatures_section_' . $lang->slug . '_description' => 'nullable|string', 'home_page_keyfeatures_section_create_content_' . $lang->slug . '_description' => 'nullable|string', 'home_page_keyfeatures_section_create_content_btn_' . $lang->slug . '_text' => 'nullable|string', 'home_page_keyfeatures_section_create_content_btn_' . $lang->slug . '_url' => 'nullable|string', ]); $fields = [ 'home_page_keyfeatures_section_' . $lang->slug . '_title', 'home_page_keyfeatures_section_create_content_' . $lang->slug . '_title', 'home_page_keyfeatures_section_' . $lang->slug . '_subtitle', 'home_page_keyfeatures_section_' . $lang->slug . '_description', 'home_page_keyfeatures_section_create_content_' . $lang->slug . '_description', 'home_page_keyfeatures_section_create_content_btn_' . $lang->slug . '_text', 'home_page_keyfeatures_section_create_content_btn_' . $lang->slug . '_url' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } $fields = [ 'home_page_'.$home_variant.'_feature_items', 'home_page_06_features_bg', 'home_page_08_features_bg', 'home_page_09_features_bg', 'home_page_06_features_bg_2', 'home_page_06_features_leaf_1', 'home_page_06_features_leaf_2', 'home_page_food_order_texture_1', 'home_page_food_order_texture_2', 'home_page_food_order_texture_3', 'home_page_food_order_texture_4', 'home_page_10_bg_texture', 'home_page_10_features_bg', 'home_page_10_create_content_img', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } if($home_variant == '10'){ update_static_option('home_page_10_create_content_status', $request->home_page_10_create_content_status); update_static_option('home_page_10_create_content_btn_status', $request->home_page_10_create_content_btn_status); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function price_plan_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.price-plan-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function update_price_plan_area(Request $request) { $all_languages = Language::all(); $home_variant = get_static_option('home_page_variant'); $this->validate($request, [ 'home_page_'.$home_variant.'_price_plan_items' => 'nullable|string', ]); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_price_plan_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_price_plan_section_' . $lang->slug . '_description' => 'nullable|string', ]); $fields = [ 'home_page_price_plan_section_' . $lang->slug . '_title', 'home_page_price_plan_section_' . $lang->slug . '_description' ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } update_static_option('home_page_price_plan_bg_image_1', $request->home_page_price_plan_bg_image_1); update_static_option('home_page_price_plan_bg_image_2', $request->home_page_price_plan_bg_image_2); $items = 'home_page_'.$home_variant.'_price_plan_items'; update_static_option($items, $request->$items); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function join_app_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.join-app-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function update_join_app_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_join_app_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_join_app_section_' . $lang->slug . '_description' => 'nullable|string', 'home_page_join_app_section_button_text_' . $lang->slug . '_left' => 'nullable|string', 'home_page_join_app_section_button_text_' . $lang->slug . '_right' => 'nullable|string', 'home_page_join_app_section_button_url_' . $lang->slug . '_left' => 'nullable|string', 'home_page_join_app_section_button_url_' . $lang->slug . '_right' => 'nullable|string', 'home_page_join_app_download_image_' . $lang->slug . '_left' => 'nullable|string', 'home_page_join_app_download_image_' . $lang->slug . '_right' => 'nullable|string', ]); $fields = [ 'home_page_join_app_section_' . $lang->slug . '_title', 'home_page_join_app_section_' . $lang->slug . '_description', 'home_page_join_app_section_button_text_' . $lang->slug . '_left', 'home_page_join_app_section_button_text_' . $lang->slug . '_right', 'home_page_join_app_section_button_url_' . $lang->slug . '_left', 'home_page_join_app_section_button_url_' . $lang->slug . '_right', 'home_page_join_app_download_image_' . $lang->slug . '_left', 'home_page_join_app_download_image_' . $lang->slug . '_right' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } $fields = [ 'home_page_join_app_top_image', 'home_page_join_app_bottom_image', 'home_page_join_app_left_button_icon', 'home_page_join_app_right_button_icon', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function full_width_features_area() { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); return view('backend.pages.home-page-manage.full-width-features-settings')->with([ 'all_languages' => $all_languages, 'home_page_variant' => $home_page_variant ]); } public function update_full_width_features_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_full_width_features_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_full_width_features_section_' . $lang->slug . '_subtitle' => 'nullable|string', 'home_page_full_width_features_section_' . $lang->slug . '_description' => 'nullable|string', ]); $fields = [ 'home_page_full_width_features_section_' . $lang->slug . '_title', 'home_page_full_width_features_section_' . $lang->slug . '_subtitle', 'home_page_full_width_features_section_' . $lang->slug . '_description' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function intro_video_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.intro-video-settings')->with([ 'all_languages' => $all_languages ]); } public function update_intro_video_area(Request $request) { $this->validate($request, [ 'home_page_intro_video_section_video_url' => 'nullable|string', 'home_page_intro_video_section_video_bg' => 'nullable|string', 'home_page_intro_video_section_bg_1' => 'nullable|string', 'home_page_intro_video_section_bg_2' => 'nullable|string', ]); $fields = [ 'home_page_intro_video_section_video_url', 'home_page_intro_video_section_video_bg', 'home_page_intro_video_section_bg_1', 'home_page_intro_video_section_bg_2' ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function call_to_action_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.call-to-action-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_call_to_action_area(Request $request) { $all_languages = Language::all(); $home_page_variant = get_static_option('home_page_variant'); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_call_to_action_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_call_to_action_section_' . $lang->slug . '_description' => 'nullable|string', 'home_page_call_to_action_section_' . $lang->slug . '_subtitle' => 'nullable|string', 'home_page_call_to_action_section_btn_' . $lang->slug . '_text' => 'nullable|string', 'home_page_call_to_action_section_btn_' . $lang->slug . '_url' => 'nullable|string', 'home_page_call_to_action_section_btn_second_' . $lang->slug . '_text' => 'nullable|string', 'home_page_call_to_action_section_btn_second_' . $lang->slug . '_url' => 'nullable|string', ]); $fields = [ 'home_page_call_to_action_section_' . $lang->slug . '_title', 'home_page_call_to_action_section_' . $lang->slug . '_description', 'home_page_call_to_action_section_' . $lang->slug . '_subtitle', 'home_page_call_to_action_section_btn_' . $lang->slug . '_text', 'home_page_call_to_action_section_btn_' . $lang->slug . '_url', 'home_page_call_to_action_section_btn_second_' . $lang->slug . '_text', 'home_page_call_to_action_section_btn_second_' . $lang->slug . '_url' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } $non_lang_fields = [ 'home_page_call_to_action_section_img', 'home_page_call_to_action_section_app_store_logo_1', 'home_page_call_to_action_section_app_store_url_1', 'home_page_call_to_action_section_app_store_logo_2', 'home_page_call_to_action_section_app_store_url_2', ]; foreach ($non_lang_fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } if($home_page_variant == '08' || $home_page_variant == '11' || $home_page_variant == '02'){ update_static_option('home_page_call_to_action_bg_image_' . $home_page_variant, $request->home_page_call_to_action_bg_image); } if($home_page_variant == '09'){ update_static_option('home_page_call_to_action_section_app_store_status_2', $request->home_page_call_to_action_section_app_store_status_2); update_static_option('home_page_call_to_action_section_app_store_status_1', $request->home_page_call_to_action_section_app_store_status_1); } if($home_page_variant == '07' || $home_page_variant == '08' || $home_page_variant == '11' || $home_page_variant == '06'){ update_static_option('home_page_call_to_action_section_btn_status', $request->home_page_call_to_action_section_btn_status); } if($home_page_variant == '03' || $home_page_variant == '04' || $home_page_variant == '06' || $home_page_variant == '06'){ update_static_option('home_page_call_to_action_shape_1_home_' . $home_page_variant, $request->home_page_call_to_action_shape_1_home); update_static_option('home_page_call_to_action_shape_2_home_' . $home_page_variant, $request->home_page_call_to_action_shape_2_home); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function map_promo_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.map-promo-area-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_map_promo_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_map_promo_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_map_promo_section_' . $lang->slug . '_description' => 'nullable|string', 'home_page_map_promo_section_btn_' . $lang->slug . '_text' => 'nullable|string', 'home_page_map_promo_section_btn_' . $lang->slug . '_url' => 'nullable|string', ]); $fields = [ 'home_page_map_promo_section_' . $lang->slug . '_title', 'home_page_map_promo_section_' . $lang->slug . '_description', 'home_page_map_promo_section_btn_' . $lang->slug . '_text', 'home_page_map_promo_section_btn_' . $lang->slug . '_url', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_map_promo_bg_image', $request->home_page_map_promo_bg_image); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function offer_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.offer-area-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_offer_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_offer_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_offer_section_btn_' . $lang->slug . '_text' => 'nullable|string', 'home_page_offer_section_btn_' . $lang->slug . '_url' => 'nullable|string', ]); $fields = [ 'home_page_offer_section_' . $lang->slug . '_title', 'home_page_offer_section_btn_' . $lang->slug . '_text', 'home_page_offer_section_btn_' . $lang->slug . '_url', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_offer_bg_image', $request->home_page_offer_bg_image); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function about_us_top_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.about-us-top-area-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_about_us_top_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_about_us_top_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_about_us_top_section_' . $lang->slug . '_description' => 'nullable|string', ]); $fields = [ 'home_page_about_us_top_section_' . $lang->slug . '_title', 'home_page_about_us_top_section_' . $lang->slug . '_description', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_about_us_top_bg_image', $request->home_page_about_us_top_bg_image); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function portfolio_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.portfolio-area-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_portfolio_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_portfolio_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_portfolio_section_' . $lang->slug . '_subtitle' => 'nullable|string', ]); $fields = [ 'home_page_portfolio_section_' . $lang->slug . '_title', 'home_page_portfolio_section_' . $lang->slug . '_subtitle', ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_portfolio_shape_1', $request->home_page_portfolio_shape_1); update_static_option('home_page_portfolio_shape_2', $request->home_page_portfolio_shape_2); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function get_in_touch_banner_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.get-in-touch-banner-area-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_get_in_touch_banner_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_get_in_touch_banner_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_get_in_touch_banner_section_' . $lang->slug . '_phone' => 'nullable|string', 'home_page_get_in_touch_banner_section_' . $lang->slug . '_email' => 'nullable|string', ]); $fields = [ 'home_page_get_in_touch_banner_section_' . $lang->slug . '_title', 'home_page_get_in_touch_banner_section_' . $lang->slug . '_phone', 'home_page_get_in_touch_banner_section_' . $lang->slug . '_email' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_get_in_touch_banner_shape_1', $request->home_page_get_in_touch_banner_shape_1); update_static_option('home_page_get_in_touch_banner_shape_2', $request->home_page_get_in_touch_banner_shape_2); update_static_option('home_page_get_in_touch_banner_shape_3', $request->home_page_get_in_touch_banner_shape_3); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function contact_us_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.contact-us-area-settings')->with([ 'all_languages' => $all_languages, ]); } public function update_contact_us_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_contact_us_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_contact_us_section_' . $lang->slug . '_subtitle' => 'nullable|string', 'home_page_contact_us_section_' . $lang->slug . '_contact' => 'nullable|string', 'home_page_contact_us_section_' . $lang->slug . '_email' => 'nullable|string', 'home_page_contact_us_section_' . $lang->slug . '_address' => 'nullable|string', ]); $fields = [ 'home_page_contact_us_section_' . $lang->slug . '_title', 'home_page_contact_us_section_' . $lang->slug . '_subtitle', 'home_page_contact_us_section_' . $lang->slug . '_contact', 'home_page_contact_us_section_' . $lang->slug . '_email', 'home_page_contact_us_section_' . $lang->slug . '_address' ]; foreach ($fields as $field) { if ($request->has($field)) { update_static_option($field, $request->$field); } } } update_static_option('home_page_contact_us_bg_1', $request->home_page_contact_us_bg_1); update_static_option('home_page_contact_us_bg_2', $request->home_page_contact_us_bg_2); update_static_option('home_page_contact_us_bg_10', $request->home_page_contact_us_bg_10); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function section_manage() { return view('backend.pages.section-manage'); } public function update_section_manage(Request $request) { $home_variant = get_static_option('home_page_variant'); if ($home_variant == '01') $fields = ['topbar', 'navbar', 'header', 'header_image', 'brand', 'features', 'join_app', 'full_width_feature', 'price_plan', 'testimonial', 'faq', 'latest_blog']; elseif ($home_variant == '02') $fields = ['topbar', 'navbar', 'header', 'brand', 'features', 'full_width_feature', 'price_plan', 'offer', 'testimonial', 'faq', 'latest_blog', 'call_to_action']; elseif ($home_variant == '03') $fields = ['topbar', 'navbar', 'header', 'features', 'full_width_feature', 'price_plan', 'call_to_action', 'portfolio', 'testimonial', 'latest_blog', 'contact']; elseif ($home_variant == '04') $fields = ['topbar', 'navbar', 'header', 'about_us_top', 'features', 'intro_video', 'full_width_feature', 'price_plan', 'portfolio', 'testimonial', 'call_to_action', 'latest_blog', 'get_in_touch']; elseif ($home_variant == '05') $fields = ['topbar', 'navbar', 'header', 'features', 'full_width_feature', 'price_plan', 'testimonial', 'brand', 'map', 'join_app', 'latest_blog']; elseif($home_variant == '06') $fields = ['topbar','header','price_plan','features','full_width_feature','testimonial','contact']; elseif($home_variant == '07') $fields = ['topbar','navbar','header','features','works','full_width_feature','call_to_action','order_experience','testimonial']; elseif($home_variant == '08') $fields = ['topbar','navbar','header','gym_workout','features','full_width_feature','testimonial','call_to_action','latest_blog']; elseif($home_variant == '09') $fields = ['topbar','navbar','header','works','call_to_action','features','brand','full_width_feature','testimonial','map']; elseif($home_variant == '10') $fields = ['topbar','navbar','header','features','full_width_feature','testimonial','faq','contact']; elseif($home_variant == '11') $fields = ['topbar','navbar','header','features','full_width_feature','counterup','testimonial','brand','call_to_action']; foreach ($fields as $field) { $filed_name = 'home_page_' . $field . '_section_status'; update_static_option($filed_name, $request->$filed_name); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function latest_blog_area() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.latest-blog-settings')->with([ 'all_languages' => $all_languages ]); } public function update_latest_blog_area(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_latest_blog_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_latest_blog_section_' . $lang->slug . '_subtitle' => 'nullable|string', ]); $fields = [ 'home_page_latest_blog_section_' . $lang->slug . '_title', 'home_page_latest_blog_section_' . $lang->slug . '_subtitle' ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } update_static_option('home_page_latest_blog_section_display_item', $request->home_page_latest_blog_section_display_item); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function how_it_works_home() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.how-it-works-home-settings')->with([ 'all_languages' => $all_languages ]); } public function update_how_it_works_home(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_works_section_' . $lang->slug . '_title' => 'nullable|string', ]); $fields = [ 'home_page_works_section_' . $lang->slug . '_title', ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } update_static_option('home_page_works_section_display_item', $request->home_page_works_section_display_item); update_static_option('home_page_works_section_bg_1', $request->home_page_works_section_bg_1); update_static_option('home_page_works_section_bg_2', $request->home_page_works_section_bg_2); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function ordering_experience() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.ordering-experience-settings')->with([ 'all_languages' => $all_languages ]); } public function update_ordering_experience(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_ordering_experience_section_' . $lang->slug . '_title' => 'nullable|string', ]); $fields = [ 'home_page_ordering_experience_section_' . $lang->slug . '_title', ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } update_static_option('home_page_ordering_experience_section_bg', $request->home_page_ordering_experience_section_bg); update_static_option('home_page_ordering_experience_section_bg_img', $request->home_page_ordering_experience_section_bg_img); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function gym_workout() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.gym-workout-settings')->with([ 'all_languages' => $all_languages ]); } public function update_gym_workout(Request $request) { $all_languages = Language::all(); $this->validate($request, [ 'home_page_gym_workout_section_bg'=> 'nullable|string', 'home_page_gym_workout_section_app_store_status_1'=> 'nullable|string', 'home_page_gym_workout_section_app_store_logo_1'=> 'nullable|string', 'home_page_gym_workout_section_app_store_url_1'=> 'nullable|string', 'home_page_gym_workout_section_app_store_status_2'=> 'nullable|string', 'home_page_gym_workout_section_app_store_logo_2'=> 'nullable|string', 'home_page_gym_workout_section_app_store_url_2'=> 'nullable|string' ]); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_gym_workout_section_' . $lang->slug . '_title' => 'nullable|string', 'home_page_gym_workout_section_' . $lang->slug . '_description' => 'nullable|string', 'home_page_gym_workout_section_' . $lang->slug . '_features' => 'nullable|string', ]); $fields = [ 'home_page_gym_workout_section_' . $lang->slug . '_title', 'home_page_gym_workout_section_' . $lang->slug . '_description', 'home_page_gym_workout_section_' . $lang->slug . '_features', ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } $fields = [ 'home_page_gym_workout_section_bg', 'home_page_gym_workout_section_app_store_status_1', 'home_page_gym_workout_section_app_store_logo_1', 'home_page_gym_workout_section_app_store_url_1', 'home_page_gym_workout_section_app_store_status_2', 'home_page_gym_workout_section_app_store_logo_2', 'home_page_gym_workout_section_app_store_url_2' ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } public function counterup() { $all_languages = Language::all(); return view('backend.pages.home-page-manage.counterup-settings')->with([ 'all_languages' => $all_languages ]); } public function update_counterup(Request $request) { $all_languages = Language::all(); foreach ($all_languages as $lang) { $this->validate($request, [ 'home_page_counterup_section_' . $lang->slug . '_title' => 'nullable|string', ]); $fields = [ 'home_page_counterup_section_' . $lang->slug . '_title', ]; foreach ($fields as $field) { update_static_option($field, $request->$field); } } update_static_option('home_page_counterup_bg_1', $request->home_page_counterup_bg_1); update_static_option('home_page_counterup_bg_2', $request->home_page_counterup_bg_2); update_static_option('home_page_counterup_section_display_item', $request->home_page_counterup_section_display_item); return redirect()->back()->with([ 'msg' => __('Settings Updated...'), 'type' => 'success' ]); } }