Try:
$reports = Report::where([
'id' => $request->report_id,
'absender_persoid' => $request->perso_id,
])->get();
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
Hello,
I'm currently trying to get all the models (that meet several conditions) and spend the first one of them. However, when I access them with (first), I only get this:
$reports = Report::where([
["id", $request->report_id],
["absender_persoid", $request->perso_id]
])->get();
Result from $reports->dd(): https://picr.eu/images/2021/07/31/YbF1l.png
But $reports->first()->dd(): https://picr.eu/images/2021/07/31/YbGOI.png
What am I doing wrong?
Please or to participate in this conversation.