Preview:
$promises = Http::pool(function (Pool $pool) use ($schoolId, $filter, $batch, $studentGroupId) {
            $pool->as('schoolStaff')->withToken(Auth::user()->token())
                ->get(Api::schoolStaff()->index($schoolId, [], true), $filter);
            $pool->as('schoolBatchStudentGroup')->withToken(Auth::user()->token())
                ->get(Api::schoolBatchStudentGroup()->detail($schoolId, $batch, $studentGroupId, true));
        });

        $staffDatas = json_decode($promises['schoolStaff']->getBody(), true)['data'] ?? [];
        $studentGroup = json_decode($promises['schoolBatchStudentGroup']->getBody(), true)['data'] ?? [];
downloadDownload PNG downloadDownload JPEG downloadDownload SVG

Tip: You can change the style, width & colours of the snippet with the inspect tool before clicking Download!

Click to optimize width for Twitter