Answers for "Laravel Extract Values From Collection Using Pluck() with Relationship"

PHP
0

Laravel Extract Values From Collection Using Pluck() with Relationship

$users = User::with('profile')->get();
   $bio = $users->pluck('profile.bio'); // Get all bio of all users profile
  
   dd($bio);
Posted by: Guest on May-07-2022

Code answers related to "Laravel Extract Values From Collection Using Pluck() with Relationship"

Browse Popular Code Answers by Language