/** * Display a listing of the resource. * * @return Response */ public function index() { $municipios = \App\Municipio::orderBy('nome')->get(); return compact('municipios'); }
public function getMunicipios() { $municipios = Municipio::orderBy('nombre')->get(); return response()->json($municipios)->setCallback(Input::get('callback')); }