Laravel Curl异步请求

时间:2018-01-28 05:55:21

标签: php laravel curl asynchronous

我想为我自己的Laravel API创建一个异步请求,用于发送多封电子邮件。我不想使用队列。我想调用一个执行脏工作的脚本。

我正在使用Curl,但它不会调用脚本。请帮忙。

SELECT track_date AS label, track_count AS value,
  (SELECT count(track_id) AS track_sum
   FROM tracker_details
   WHERE (DATE(date_created) >= '2018-01-21' 
          AND DATE(date_created) <= '2018-01-27') 
   AND client_id = 1) as total
FROM trackers
INNER JOIN (
SELECT tracker_details.track_id, COUNT(track_id) AS track_count, DATE(date_created) AS track_date
    FROM tracker_details
    WHERE (DATE(date_created) >= '2018-01-21' 
    AND DATE(date_created) <= '2018-01-27') 
    AND client_id = 1
    GROUP BY DATE(date_created)) as tracker_details 
ON trackers.track_id = tracker_details.track_id
WHERE trackers.client_id = 1 
ORDER BY DATE(track_date)

我觉得虽然发送了http代码200,但它没有达到预期的网址。

当我执行相同网址的file_get_contents时,它会返回category 1 -subcategory 1 -subcategory 1 -subcategory 2 -subcategory 2 -subcategory 3 category 2 -subcategory 4的视图代码,而不是返回回显的响应。

0 个答案:

没有答案