I have Laravel 6 project and when I use Barryvdh\DomPDF to load the pdf into my public folder I get the message error below
The "Symfony\Component\Debug\Exception\FatalThrowableError" class is deprecated since Symfony 4.4. 16384
This is my Controller function
<?php
namespace App\Http\Controllers\MyController;
use App\Http\Controllers\Controller;
use Illuminate\Http\Request;
use PDF;
class MyController extends Controller
{
function load_pdf(Request $req){
$data = [ 'Message' => 'MY PDF'];
PDF::loadView('pdf', $data)->save(public_path())->stream('mypdf.pdf');
return "It's Okey";
}
}
'pdf' it's a view in the views folder and i already add this to my app file in config folder
'providers' => [
....
Barryvdh\DomPDF\ServiceProvider::class,
],
'aliases' => [
....
'PDF' => Barryvdh\DomPDF\Facade::class,
]
Any solution ??
Barryvdh\DomPDF's GitHub page, but it hasn't been addressed yet. So it has nothing to do with your code, and everything to do with the package and it's dependencies. - aynber