Parameter 1 passed to Illuminate\Database\Grammar::parameterize() must be of array type, given the string, in
P粉366946380
P粉366946380 2023-12-14 09:50:33
0
1
676

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],
        ]);
    }

P粉366946380
P粉366946380

reply all(1)
P粉106715703

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.

Perbaikan_laporan::create([
        "jadwal_sidang_id" => $request->jadwal_sidang_id,
        "mahasiswa_id" => $request->mahasiswa_id,
        "dosen_id" => $request->dosen_id,
        "perbaikan_laporan" => $request->perbaikan_laporan[$key],
    ]);
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template