Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

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);
Source by laratutorials.com #
 
PREVIOUS NEXT
Tagged: #Laravel #Extract #Values #From #Collection #Using #Relationship
ADD COMMENT
Topic
Name
4+6 =