From e72d915ea6b4eb038b117598dad2b48e28747bc1 Mon Sep 17 00:00:00 2001 From: "CHIEFSOFT\\ameye" Date: Thu, 7 Nov 2024 06:54:42 -0500 Subject: [PATCH] $banner_action --- www-api/app/Models/ResultFormatter.php | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/www-api/app/Models/ResultFormatter.php b/www-api/app/Models/ResultFormatter.php index f1801aaf..a7d3caa9 100644 --- a/www-api/app/Models/ResultFormatter.php +++ b/www-api/app/Models/ResultFormatter.php @@ -468,6 +468,7 @@ class ResultFormatter extends Model for ($i = 0; $i < $total; $i++) { $key = sprintf("%05d", $i); $banner_action = $out["action_${key}"]; + /* $res["result_list"][] = [$banner_action => ["banner" => @@ -493,6 +494,30 @@ class ResultFormatter extends Model ] ] ]; +*/ + $res["result_list"][$banner_action] = + ["banner" => + [ + "text" => $out["title_${key}"], + "contract" => $out["contract_${key}"], + "card_type" => $out["card_type_${key}"], + "style" => $out["card_style_${key}"], + "description" => $out["description_${key}"], + "blog_id" => $out["blog_id_${key}"], + "card_icon" => $out["card_icon_${key}"], + "offer_id" => $out["offer_id_${key}"], + "image" => $this->fixEmptyBanner( $out["banner_${key}"]), + "banner_location" => $out["banner_location_${key}"], + "link_path" => $out["link_path_${key}"], + "action" => $banner_action, + "button_text" => $out["button_text_${key}"], + "short_button_text" => $out["short_button_text_${key}"], + "short_title" => $out["short_title_${key}"], + "short_description" => $out["short_description_${key}"], + "short_style" => $out["short_style_${key}"], + "status"=> 1 + ] + ]; } break;