给定一个带有一些扩展名的Postgres数据库,例如address_standardizer,如何使用Query Builder运行以下语句:
SELECT pprint_addy(normalize_address('202 East Fremont Street, Las Vegas, Nevada 89101'));
Which yields:
202 E Fremont St, Las Vegas, NV 89101
答案 0 :(得分:0)
您可以使用DB::select()
方法运行原始select语句:
$data = DB::select('SELECT pprint_addy(normalize_address(?)) as address', ['202 East Fremont Street, Las Vegas, Nevada 89101']);
print_r($data);