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.
Take your time to understand each concept before moving on to the next one.
Practice the examples in your own development environment for better understanding.
Don't hesitate to review the additional resources mentioned in the article.
Page loaded in 34.88 ms