join('providers as p', 'd.provider_id', '=', 'p.id') ->join('pricings as pr', 'd.id', '=', 'pr.service_id') ->get(['d.*', 'p.name as provider_name', 'pr.*']); } public static function domainsDataShowPage(string $domain_id) { return DB::table('domains as d') ->join('providers as p', 'd.provider_id', '=', 'p.id') ->join('pricings as pr', 'd.id', '=', 'pr.service_id') ->where('d.id', '=', $domain_id) ->get(['d.*', 'p.name as provider_name', 'pr.*']); } public static function domainsDataEditPage(string $domain_id) { return DB::table('domains as d') ->join('pricings as pr', 'd.id', '=', 'pr.service_id') ->where('d.id', '=', $domain_id) ->get(['d.*', 'pr.*']); } }