Hello everyone, today we will see how to solve the following error when using Request::ajax() to verify that the request is via ajax, the error is the following:
Non-static method Illuminate\Http\Request::ajax() should not be called statically
The solution is very easy! Simply within our controller that we are using we must replace the line:
use Illuminate\Http\Request
by:
use Request;
Now it should work perfectly, at least for me :D, I hope it helps more than one.
Page loaded in 38.32 ms