예제 #1
0
<?php

$this->respond(['GET', 'POST'], '/get/control-data', function ($request, $response, $service, $app) {
    $processLogs = Logs::getProcessLogs();
    $processForCheckLogs = Logs::getProcessForCheckLogs();
    $marketingListLogs = Logs::getMarketingListLogs();
    $demands = Demands::getDemands();
    $lids = Lids::getLids();
    $trackedAssets = TrackedAssets::getTrackedAssets();
    $investors = Investors::getInvestorsForControlPanel();
    $notifications = Notifications::getAllNotificationsToShow();
    $result = array("processLogs" => $processLogs, "processForCheckLogs" => $processForCheckLogs, "marketingListLogs" => $marketingListLogs, "demands" => $demands, "lids" => $lids, "trackedAssets" => $trackedAssets, "investors" => $investors, "notifications" => $notifications);
    $response->json(Result::success('', $result));
});