Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

oriceon's avatar

Upgrade to 5.8 :: Class blade.compiler does not exist

Hi there.

After i upgrading from Laravel 5.7 to 5.8 i receive an error: In Container.php line 794 Class blade.compiler does not exist

In upgrade guide i do not see something related to blade ..

Any ideea what happened?

Edit: found the problem: In prev config\app.php i loaded manualy App\Providers\BladeServiceProvider::class

Now it seems clash with auto discover package or so. Removed and now workin` as excpected...

0 likes
6 replies
bestmomo's avatar

For upgrade the best way is to use a fresh new install and copy files. It may seem longer but finally we save time.

jlrdw's avatar

I usually look for changes in laravel also not just the framework.

Anyway for Windows there's a program called winmerge that handles that for me.

Just have to be careful not to override any custom code you have.

I know there's an upgrade guide but believe me comparing each file and updating differences it's so much more efficient and it took me about 10 minutes to upgrade. Not counting a couple more minutes to composer update.

jcobb's avatar

For me the problem was that I had a custom blade directive in the register() method of /App/Providers/AppServiceProvider and custom Blade directives need to be in the boot() method instead.

11 likes
lawdoc71's avatar

Hilarious, I cannot believe I missed this, thx!

Please or to participate in this conversation.