DEV Community

あとやす / a_yasui
あとやす / a_yasui

Posted on • Updated on

PHP Fatal error: Uncaught ReflectionException: Class mailer does not exist

よくあるハマりどころ。大体は Facade の書き出しが失敗してたりするのが原因っぽい。

他の考えられるのは、classmap を作成時に全く関係ない箇所でエラーが出ているが App\Exceptions\Handler で地道なエラーメール通知をしてるので、 Mail:: を使ってない?とかそこらへん。

確認箇所 その1 -- check point 1

file : app/Exceptions/Handler.php

If it send a email in `report' method, You do comment out it.

The Upgrading work and some error catch the report when the email facade does not compiling it.

やってみること その1 -- try 1

config/app.phpprovidersIlluminate\Mail\MailServiceProvider::class が抜けていないか確認

You check the Illuminate\Mail\MailServiceProvider::class in the providers at config/app.php.

やってみること その2 -- try 2

composer dumpautoload

やってみること その3 -- try 3

`

rm -rf vendor && composer install
`

やってみること その4 -- try 4

If exists bootstrap/cache/compiled.php, delete it.

`

rm -f bootstrap/cache/compiled.php
`

参考

Top comments (0)