$users = User::select('name')->distinct()->get();
$categories = Machine::distinct('category')->pluck('category');
$users = DB::table('users')
->select('id','name', 'email')
->groupBy('name')
->get();
<?php
namespace AppHttpControllers;
class ITSController extends Controller
{
/**
* Write code on Method
*
* @return response()
*/
public function index()
{
$data = [1,2,4,5,3,2,2,4,5,6,8,9];
$data = collect($data)->unique();
dd($data);
}
}