laravel collection remove repeat code example Example: laravel collection remove duplicates $unique = $collection->unique();