Non-static method Illuminate\Http\Request::method() should not be called statically. This error you are fetching when you try to something output from the not static method.
In another work, we can say that this issue is generated when you are trying to call a non-static method of IlluminateHttpRequest.
To resolve this issue, Use FACADE rather than IlluminateHttpRequest import it at the top of the controller and use it.
It means when you call a method "statically" on a facade like Request::all() But the actual method call on the Illuminate\Http\Request
For the calling request data from the method, you just need to call use Illuminate\Http\Request
But while you working with another request then your request is called like use Request. So keep in mind.
I solved this error just added "\" (slash) before the request and it is solved.
<?php
namespace App\Http\Controllers;
use Illuminate\Http\Request;
class HomeController extends Controller
{
public function index(Request $request)
{
$input = $request->all();
dd($input);
// array:1 [▼
// "name" => "haresh"
// ]
$myRequestMethod = \Request::method();
dd($myRequestMethod);
// GET
if(\Request::isMethod('patch')){
// true
}
}
}
We always thanks to you for reading our blogs.
Dharmesh Chauhan
(Swapinfoway Founder)Hello Sir, We are brothers origin from Gujarat India, Fullstack developers working together since 2016. We have lots of skills in web development in different technologies here I mention PHP, Laravel, Javascript, Vuejs, Ajax, API, Payment Gateway Integration, Database, HTML5, CSS3, and Server Administration. So you need our service Please Contact Us
Haresh Chauhan
(Co-Founder)We Are Also Recommending You :
- Filtering data excel export in laravel example
- Laravel 10 Arr::pluck() Helper Function Use Example
- Build a Complete Blog System in Laravel 12 (Step-by-Step Guide 2026)
- Laravel 10 Horizon Integration Tutorial Example
- How to hide image URL from IMG tag src laravel
- How to Generate PDF File Using DomPDF In Laravel 9 Example
- Laravel 9 CRUD Operation From Scratch Step By Step Guideline
- How to use Date Format Validation in Laravel?
- Create Custom Route File With New Service Provider Laravel 8 9
- Build SaaS App in Laravel 12 (Multi-Tenant Step-by-Step Guide 2026)