Image not found or type unknown in pdf

76

public function pdf()
{
    $users = User::get();
    $pdf = PDF::loadView('pdf', compact('users'));
    $pdf->getDomPDF()->setHttpContext(
        stream_context_create([
            'ssl' => [
                'allow_self_signed'=> TRUE,
                'verify_peer' => FALSE,
                'verify_peer_name' => FALSE,
            ]
        ])
    );

    return $pdf->download('Users.pdf');
}

Comments

Submit
0 Comments