Mark all fields from a query

Posted 8 months ago by richardh

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

Please sign in or create an account to participate in this conversation.

Laracasts Mascot

Hi, Have We Met Yet?

Did you know that, in addition to the forum, Laracasts includes well over 1000 lessons on modern web development? All for the price of one lunch out per month.

Sign Me Up


Reply to

Use Markdown with GitHub-flavored code blocks.