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')

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

return array_column($patients , "follow_up");
See also  How to use assert in Python?

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.