Closed mlambley closed 1 year ago
This is not a bug
You are reading Lumen instructions, not Laravel instructions, laravel uses autodiscover https://github.com/barryvdh/laravel-dompdf/blob/7516caab940796d31267da9b30b548a56bef50cb/readme.md?plain=1#L18-L25
Notwithstanding the unnecessary smart-alec side commentary from this other fellow here, perhaps including full instructions in the Laravel section might help? Laravel did not autodiscover this for me, I had to include it in config/app.php
Laravel did not autodiscover this for me
Seems like a problem with your implementation, did you try ?
php artisan config:clear
composer update
It's not a bug or an issue
Would have appreciated the situation to be handled without the meme or the laugh emotes, but if you insist that no one else could possibly make that same mistake I'll not say another word on the topic.
I fell into the same trap. Out of habit from other instruction, I only found the configuration steps for Laravel after looking up this issue. These are after the Using
chapter.
Just my 49 cents.
Describe the bug Installation instructions are incorrect. Service providers are not registered in
bootstrap/app.php
To Reproduce Steps to reproduce the behavior:
$app->register(\Barryvdh\DomPDF\ServiceProvider::class);
insidebootstrap/app.php
as described in the READMEExpected behavior Error to not appear
Additional context Service providers should be wired up via
config/app.php
in thePackage Service Providers...
section, or alternatively in theAppServiceProvider
register function. By loading them inbootstrap/app.php
, the config object has not been loaded into the application yet.