$items = DB::table('item')->select('item_name')->distinct()->get();
$ad->getcodes()->distinct('pid')->count('pid');
$dataList = [1,2,4,5,3,2,1,98,1,2,4,5,6];
$dataList = collect( $dataList )->unique();
use IlluminateSupportFacadesDB;
$users = DB::table('users')
->join('contacts', 'users.id', '=', 'contacts.user_id')
->join('orders', 'users.id', '=', 'orders.user_id')
->select('users.*', 'contacts.phone', 'orders.price')
->get();
use IlluminateSupportFacadesDB;
$users = DB::table('users')
->join('contacts', 'users.id', '=', 'contacts.user_id')
->join('orders', 'users.id', '=', 'orders.user_id')
->select('users.*', 'contacts.phone', 'orders.price')
->get();