I am trying to use this package -> http://packalyst.com/packages/package/wemersonjanuario/laravelpdf
I have installed and configured as per the website and also I had used this package couple of times which worked following the same procedure.
But now its giving the error Class 'Inline\PDF\PDF' not found
Not sure whats the mistake.
Can someone please help me sort this issue.
Below is the sample code
Composer.json file
"h4cc/wkhtmltopdf-i386": "0.12.3",
"wemersonjanuario/laravelpdf": "1.0.*"
app.php file
'providers' => [
// other providers
Inline\LaravelPDF\PDFServiceProvider::class
],
'aliases' => [
// other aliases
'PDF' => Inline\LaravelPDF\PDFFacade::class,
],
In config/laravelpdf.php file
<?php
return [
'executable' => base_path().'/vendor/h4cc/wkhtmltopdf-i386/bin/wkhtmltopdf-i386'
];
PHP Pdf code
use Inline\LaravelPDF\PDFFacade as PDF;
class SummaryHelper
{
public function getReport($date)
{
// Some code
$data = [ ]; // some data in it
$pdf_obj = PDF::loadView('vendor/daily-report', $data);
}
}
via Sharath