Skip to content

PHP code snippet – How get just one parameter of all objects in one array in laravel?

$patients_id = FollowUpQuestionsAfterSurgery::
orderBy('id' , 'desc')
->pluck("patient_id");

$patients = Paitent::whereIn("id" , $patients_id)->get()->->toArray();


return array_column($patients , "follow_up");
See also  TypeScript code snippet - How are uv rays produced?

Leave a Reply

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.