Level 36
PrivateMessage::where('recipient_id', '=', $request->authedUser->id)->update([
'read' => 1
])
Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.
I have a column in a database where the I want to search user_id and mark all fields when I get the result. I am not sure how to mark all the fields when I have to data.
my query :
$user = PrivateMessage::where('recipient_id', '=', $request->authedUser->id)->get();
then I want to set PrivateMessage->read = 1
how would I do this
PrivateMessage::where('recipient_id', '=', $request->authedUser->id)->update([
'read' => 1
])
Please or to participate in this conversation.