public function getSuperMerchantsList() { $stores = MerchantStore::parents()->with('Address.Area')->paginate(20); foreach ($stores as $key => $store) { $stores[$key]['childs'] = MerchantStore::childs($store->id)->with('Address.Area')->get(); } $output['stores'] = $stores; return view('admin.superMerchantsList', $output); }