My problem is when I redirect an icon to a route with the method to use in controller, but it doesnt read the variable. Look the case. I have a variable with dates called $salida Since my blade/view: "" My route: Route::resource('/pdf','pdfController'); and my controller is this: use Vsmoraes\Pdf\Pdf;
class pdfController extends Controller {
private $pdf;
/**
* Display a listing of the resource.
*
* @return Response
*/
public function __construct(Pdf $pdf)
{
$this->pdf=$pdf;
}
public function index()
{
$html = view('mostraringresos.mostrarsalidas')->with('salidas',$salidas)->render();
return $this->pdf
->load($html)
->show();
}
But it doesnt work. It shows to me: ErrorException in pdfController.php line 24: Undefined variable: salidas
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire