1. Go to this page and download the library: Download bladepdf/laravel library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
bladepdf / laravel example snippets
use BladePDF\Laravel\Webhooks\SignatureValidator;
use Illuminate\Http\Request;
public function handle(Request $request)
{
abort_unless(SignatureValidator::isValid($request), 401);
$event = $request->json()->all();
// Handle the verified event...
}
use BladePDF\Laravel\Facades\BladePDF;
return BladePDF::fromView('pdf.invoice', ['invoice' => $invoice])
->render()
->download("invoice-{$invoice->number}.pdf");
use BladePDF\Exceptions\BladePdfException;
use BladePDF\Laravel\Webhooks\SignatureValidator;