Greenter en Laravel #153
jeanomar13
started this conversation in
General
Replies: 2 comments 7 replies
-
Hola, |
Beta Was this translation helpful? Give feedback.
5 replies
-
Hola @jeanomar13, no necesitas usar $see = $this->sunat->getSee();
$res = $see->send($invoice); PD: Aquí se encuentra la clase Util, si necesitas algún método puedes copiarlo a tu proyecto. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Estoy intentando instalar y usar Greenter en mi proyecto desarrollado en Laravel, pero tengo dudas que me gustaria que me las resolvieran:
namespace Jolc\Repository;
use Illuminate\Support\Facades\Storage;
use Greenter\Ws\Services\SunatEndpoints;
use Greenter\See;
class Sunat{
public function getSee() {
}
}
El codigo de mi controlador es:
namespace App\Http\Controllers;
use Illuminate\Http\Request;
use App\Models\Repository\Sunat;
use Greenter\Model\Client\Client;
use Greenter\Model\Company\Company;
use Greenter\Model\Company\Address;
use Greenter\Model\Sale\Invoice;
use Greenter\Model\Sale\SaleDetail;
use Greenter\Model\Sale\Legend;
use Greenter\See;
class MyController extends Controller
{
protected $arrays, $sunat;
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function myFunction(Request $request)
{
return $this->sunat->getSee();
y cuando llamo a la clase desde mi controlador en myFunction() tengo el siguiente error:
TypeError
Argument 1 passed to Symfony\Component\HttpFoundation\Response::setContent() must be of the type string or null, object given, called in C:\xampp\htdocs\cursosweb\vendor\laravel\framework\src\Illuminate\Http\Response.php on line 65
Beta Was this translation helpful? Give feedback.
All reactions