Removing duplicates from an object
2 answers
Assuming [1,1,1,1] is collection
, you can use laravel method unique
on collection values: https://laravel.com/docs/master/collections#method-unique
I am a simple array, I think you can convert it to a collection before.
+1
source to share