$routes = DB::table('fleets')
->selectRaw("DISTINCT a3.iso_country as alt_country, a3.name as alt_name, a1.name as dep_name, a2.name as arr_name, a1.iso_country as dep_country, a2.iso_country as arr_country, r.id, r.distance, r.flight,r.departure, r.arrival, r.alternative")
->join('users as u', 'u.location', '=', 'fleets.location')
->join('routes as r', 'r.departure', '=', 'fleets.location')
->join('fleet_routes as ftr', 'ftr.route_id', '=', 'r.id')
->join('fleet_users as ftu', 'ftu.fleet_id', '=', 'fleets.fleet_id')
->join('airports as a1', 'a1.ident', '=', 'r.departure')
->join('airports as a2', 'a2.ident', '=', 'r.arrival')
->join('airports as a3', 'a3.ident', '=', 'r.alternative')
->where('fleets.booked', '=', null)
->where('fleets.arenda', '=', null)
->where('fleets.orders', '=', null)
->where('fleets.hangar', '=', null)
->where('fleets.sale', '=', null)
->where('fleets.transfer_airport', '=', null)
->where('r.type_route', '=', '1') // пассажирский
->where('r.type_flight', '=', '1') // регулярный
->where('u.id', '=', $user_id)
->where('ftu.user_id', '=', $user_id)
->paginate(10);