samy918's avatar

Log::info in a middleware: non-static method isn't allowed

Hi guys

I tried to use Log::info in a middleware. But I get the error that it isn't allowed to use non-static method. Do you have any idea?

0 likes
1 reply
bobbybouwmann's avatar

Well facades aren't using static methods. You need to make sure that you import that correct class!

What class did you import? It should be this

use Illuminate\Support\Facades\Log;

Please or to participate in this conversation.