This is the multidimensional array and there's two column one is string and other one is laravel collection model.
array:2 [▼
0 => array:2 [▼
"email" => "myfirstemail@gmail.com"
"user" => User {#2508 ▶}
]
1 => array:2 [▼
"email" => "myfirstemail@gmail.com"
"user" => User {#2547 ▶} //laravel collection
]
]
I used php multi-dimensional array remove duplicate and it won't work for this.
I wan't to remove duplicate columns by email (no need to looked at the laravel user model.) Are there any inbuilt PHP function for this ?