data["active_test"] = "active"; } public function method(Request $request, $method) { return call_user_func([$this, $method], $request); } public function lightUp() { app("CacheShelfService")->lightUp('HAIB1-02-02','3','0'); } public function lightOff() { $params = [ "areaCode" => "1004", 'locCode' => "HAIB1-02-02", 'PTLAction' => 0, ]; $response = Http::post(config('api.haiq.storage.light'), $params); return json_decode($response->body()); } private $key = "CACHE_SHELF_AVAILABLE"; public function test() { $modelId = 1; $blacklist = []; $query = MaterialBox::query()->where("material_box_model_id",$modelId) ->where("status",4); $boxes = $query->whereNotIn("id",$query->select("id")->whereHas("performTask")); if ($blacklist)$boxes = $boxes->whereNotIn("id",$blacklist); dd($boxes->get()); } }