我有这段代码来获取存储在徽章表的“内容”列中的徽章内容。问题是它在“ $ pdf-> loadHTML($ badgeContent-> content);”中显示“试图获取非对象的属性”; “
$badgeContent = Ticket::with('badge')->find($request->send_to_id)->first();
$pdf = app()->make('dompdf.wrapper');
$pdf->loadHTML($badgeContent->content);
return $pdf->download('test.pdf');