foreach ($request->perbaikan_laporan as $key => $value) {
Perbaikan_laporan::create([ "jadwal_sidang_id" => $request->input("jadwal_sidang_id"), "mahasiswa_id" => $request->input("mahasiswa_id"), "dosen_id" => $request->input("dosen_id"), "perbaikan_laporan" => $request->input("perbaikan_laporan")[$key], ]); }
First, you can call request data as follows, the problem is that you first define the input as a string, but when it has been converted to a string you want to use it to get the key.