/** * Show the application dashboard. * * @return Response */ public function index() { $departamentos = Ubigeo::getByParentId('00000'); return view('home', compact('departamentos')); }
public function ubigeo(Request $request, $parent_id) { $departamentos = Ubigeo::getByParentId($parent_id); return response()->json($departamentos); }