1public function pdf()
2{
3 $users = User::get();
4 $pdf = PDF::loadView('pdf', compact('users'));
5 $pdf->getDomPDF()->setHttpContext(
6 stream_context_create([
7 'ssl' => [
8 'allow_self_signed'=> TRUE,
9 'verify_peer' => FALSE,
10 'verify_peer_name' => FALSE,
11 ]
12 ])
13 );
14
15 return $pdf->download('Users.pdf');
16}
17