Skip to content

Black Deer Dev

Black Deer Dev
Black Deer Dev
  • Home
  • About
  • Blog
  • Longform
  • Portfolio
  • Home
  • About
  • Blog
  • Longform
  • Portfolio

Collections

Merge Two Collections Containing Same IDs In Laravel

March 17, 2020February 13, 2020 by Johnnyparky

Let’s say you have two Collections with the same ID. $a = collect([ ‘id’ => 1, ‘name’ => ‘Johnny’ ]); $b = collect([ ‘id’ => 1, ‘age’ => 14 ]); There’s not a helper to merge the two for a result like this. $c = [ ‘id’ => 1, ‘name’ => ‘Johnny’, ‘age’ => 14]; … Read more

Leave a comment

Categories

  • Blog
  • Longform
  • Portfolio
  • Review
  • Uncategorized

About

About me

Meta

  • Log in
  • Entries feed
  • Comments feed
  • WordPress.org

Categories

  • Blog
  • Longform
  • Portfolio
  • Review
  • Uncategorized

Tags

Ajax Array Case Insensitive Case Sensitive Collections Composer csv Curl Docker Eloquent Email Error Extensions Git Heroku Homebrew Import Ionic Javascript Laravel Mac Memory Migration Model MySql Nginx Npm Objects Passport Password PHP Postgres Production Query Builder Rails Redis Relationship Relationships Ruby S3 Schema SQL Telescope Valet Vue
© 2022 Black Deer Dev