sql语句:
select name from area where parent_id = (select id from area where area_code = '110105000000')
我想知道laravel能不能用一条语句来构造出来这样的语句呢?
目前是这么做的
$parentId = DB::table('area')->where('area_code', $id)->value('id');
$streetList = DB::table('area')->where('parent_id', $parentId)->pluck('name');