JSON QUEUE

This commit is contained in:
la#0001 2022-03-09 07:17:17 +10:00 committed by Connor
parent f32e9745c1
commit 9b67fdec21
1 changed files with 7 additions and 4 deletions

View File

@ -10,12 +10,15 @@ class RenderController extends Controller
public function getQueue(Request $request) {
$queue = RenderQueue::all();
$string = '';
foreach ($queue as $queueitem) {
$string = $string . $queueitem->type . ':' . $queueitem->target_id . ':' . $queueitem->id . ';';
foreach ($queue as $queueitem) {
$queue_array[] = [
'Type' => $queueitem->type,
'Target_ID' => $queueitem->target_id,
'Queue_ID' => $queueitem->id,
];
}
return substr_replace($string, "", -1);
return response()->json($queue_array);
}
public function upload(Request $request) {