2.0Major upgrade

Upgrade the Laravel package to 2.0

Laravel 2.0 keeps normal facade calls intact and delegates framework-independent behavior to bladepdf/php. It requires PHP 8.2+ and Laravel 11-13.

Composer update

Without Spatie
bash
 1composer require bladepdf/laravel:^2.0 --with-all-dependencies
With Spatie Laravel PDF
bash
 1composer require bladepdf/laravel:^2.0 bladepdf/spatie-laravel-pdf-driver:^2.0 --with-all-dependencies

Facade calls stay the same

BladePDF::fromView(), fromHtml(), fromTemplate(), fluent options, render(), and response/download helpers retain their normal call sites. Blade views, headers, and footers are now rendered only when the request is submitted.

Namespace changes

1.x2.x
BladePDF\Laravel\Exceptions\BladePdfExceptionBladePDF\Exceptions\BladePdfException
BladePDF\Laravel\Exceptions\RenderFailedExceptionBladePDF\Exceptions\RenderFailedException
BladePDF\Webhooks\SignatureValidatorBladePDF\Laravel\Webhooks\SignatureValidator
BladePDF\Laravel\RenderSubmissionBladePDF\RenderSubmission

The internal Laravel HTTP client and BladePDF\Laravel\Support\* classes were removed. Bind or fake BladePDF\Contracts\RenderClient and inspect BladePDF\RenderRequest instead.

Review asset roots

Laravel allows automatic files only from public_path() and storage_path('app') by default. base_path() is intentionally excluded so rendered HTML cannot read .env or application source. Publish the config and add narrowly scoped directories to asset_roots when required.

config/bladepdf.php
php
 1'asset_roots' => [
 2    public_path(),
 3    storage_path('app'),
 4    storage_path('tenants/pdf-assets'),
 5],

An explicit withAsset() remains the escape hatch for one caller-approved file outside these roots. Automatic traversal and symlink escapes now fail with AssetAccessDeniedException.

Spatie compatibility

Spatie driver 1.x belongs with Laravel package 1.x. Spatie driver 2.x belongs with Laravel package 2.x and continues to use the driver name bladepdf.