Please explain better what you want to do, which errors you are facing. the title has no meaning, and i do not see where is the problem in the image
Jun 23, 2020
6
Level 10
Dompdf id givving ???
I installed this package.
I installed dompdf in my project. I want to export auth()->user() in laravel and I have a problem like this image.
Controller.php
use Barryvdh\DomPDF\Facade as PDF;
public function PDF()
{
$pdf = PDF::loadView('load-pdf');
$pdf->set_option('font-family', 'Tahoma');
return $pdf->download('user.pdf');
}
load-pdf.blade.php
<!doctype html>
<html lang="fa" dir="rtl">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<link rel="stylesheet" href="{{ asset('css/bootstrap.min.css') }}">
<link rel="stylesheet" href="{{ asset('css/bootstrap.min-rtl.css') }}">
<style>
* {
font-family: Tahoma;
}
</style>
</head>
<body>
<div class="row">
<div class="col-md-2">
<img src="{{ asset('images/users/'.auth()->user()->image) }}" class="rounded-circle w-25">
</div>
<div class="col-md-10">
<div class="row">
<div class="col-md-4">
<div>نام:</div>
<div>{{ auth()->user()->first_name }}</div>
</div>
<div class="col-md-4">
<div>نام خانوادگی:</div>
<div>{{ auth()->user()->last_name }}</div>
</div>
<div class="col-md-4">
<div>عنوان شغلی رزومه:</div>
<div>{{ auth()->user()->job_title }}</div>
</div>
</div>
</div>
</div>
</body>
</html>
Please or to participate in this conversation.


