remove duplicates from 2 different models in laravel code example Example: laravel collection remove duplicates $unique = $collection->unique();