informativa.pdf per cliente
This commit is contained in:
@@ -4,6 +4,7 @@ namespace App\Http\Controllers;
|
||||
|
||||
use App\Models\Cliente;
|
||||
use Illuminate\Http\Request;
|
||||
use Barryvdh\DomPDF\Facade\Pdf;
|
||||
|
||||
class ClienteController extends Controller
|
||||
{
|
||||
@@ -23,7 +24,7 @@ class ClienteController extends Controller
|
||||
}
|
||||
|
||||
public function editCliente($id){
|
||||
return view('cliente.edit',['cliente'=>$id]);
|
||||
return view('cliente.edit',['cliente'=>Cliente::getClienteById($id)]);
|
||||
}
|
||||
|
||||
public function updateCliente(Request $parm){
|
||||
@@ -35,4 +36,11 @@ class ClienteController extends Controller
|
||||
Cliente::deleteCliente($id);
|
||||
return redirect()->back();
|
||||
}
|
||||
|
||||
public function informativaCliente($id)
|
||||
{
|
||||
|
||||
$pdf=Pdf::loadview('PDF.informativa',['cliente'=>Cliente::getClientebyId($id)]);
|
||||
return $pdf->stream();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user