get('q'); return Area::whereHas('parent', function ($q) use ($code) { $q->where('code', $code); })->get(['code as id', DB::raw('name as text')]); } }