get(Estado::class) ->where($this->getWhereFromQueryString(['pais_id'])) ->orderBy('nome') ->get(); return response()->json($estados, Response::HTTP_OK); } public function show($id) { return response()->json($this->get(Estado::class, $id), Response::HTTP_OK); } public function autocomplete() { $estados = Estado::with([]); return datatables()->of($estados)->toJson(); } }