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  CSS code snippet - How to make text come in one line ?

Leave a Reply

Your email address will not be published. Required fields are marked *

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