remove duplicates from column in laravel code example
Example 1: remove repeated columns laravel
$unique = $collection->unique();
Example 2: laravel remove duplicates from array
$array = array(1, 2, 2, 3);
$array = array_unique($array); // Array is now (1, 2, 3)