HomeTech PointPHP: How to fix...

PHP: How to fix error “The POST method is not supported for this route. Supported methods: GET, HEAD” Laravel

Sometimes, you may face an issue with your edit page. When you submit, this error occurs:

How to fix error “The POST method is not supported for this route. Supported methods: GET, HEAD”

You have no idea where that originated, as you are relatively new to Laravel.


Route::group([‘middleware’ => ‘auth’], function () {

Route::get(‘/’, ‘ProjectController@index’);

Route::get(‘/projects/{id}’, ‘ProjectController@show’);


Route::get(‘/create’, ‘ProjectController@create’);

Route::get(‘/projects/{id}/delete’, ‘ProjectController@destroy’);


Route::get(‘/projects/{id}/edit’, ‘ProjectController@edit’);




public function edit($id)


return view(‘project.edit’,[

‘project’ => Project::find($id)




* Update the specified resource in storage.


* @param  \Illuminate\Http\Request  $request

* @param  int  $id

* @return \Illuminate\Http\Response


public function update(Request $request)


$project = Project::find($request->id);

$project->project_name = $request->input(‘project_name’);

$project->client = $request->input(‘client’);

$project->description = $request->input(‘description’);

$project->time_span = $request->input(‘time_span’);

$project->text_report = $request->input(‘text_report’);

$project->created_by = $request->input(‘created_by’);


return  redirect(‘/’)->with(‘success’, ‘Project aangepast’);



There are various ways to handle this situation:

If you insist on using PUT, you can change the form action to POST and add a hidden method field with the value PUT as well as a hidden csrf field (if you’re using blade, simply add @csrf field and method field(‘PUT’) ). The form would then accept the request.

Simply update the form’s route and method to POST. Since you are the one specifying the route and not the resource group, it will function properly.

You may aware that this is not the answer to the OP’s question. However, Google indexed this site #1 when I looked for solutions to this problem. I believe that this will benefit others for this reason.

  • The subsequent error…
  • This route does not support the POST method. Methods supported: GET and HEAD.

caused by failure to delete the routing cache.

php artisan route:cache

add @method(‘PUT’) on the form


<form action=”…” method=”POST”>




In your situation, simply executing the command worked like a charm.

php artisan route:clear

You can change the /managers/games/id/push/ link by removing the final slash and it will start working.


method: ‘POST’,

url: “/managers/games/id/push”,

Possible cause: You haven’t yet upgraded to Laravel 5.8.

The following is how your code will appear in web.php:


First, we get rid of the random parameter id so that it looks like this:


Second, ditch the @method(‘PUT’) from your form; in this case, we’ll stick with the tried-and-true POST method.

But how can you send that identifier to my method?

The first thing you need to do is create a form input field and give it the hidden property.

A hidden input with the following parameters:

 input type=”hidden”, value=”$project->id”, name=”id”>

You’ll need to retrieve that ID in the update method of your controller.

$id = $request->input(‘id’);

Consequently, you cannot utilise it to determine which work needs updating.

$project = Project::find($id)


$project = Project::where(‘id’,$id);

The simple way to fix this is to add this to your form.




{{ csrf_field() }}

<input type=”hidden” name=”_method” value=”PUT”>


then the update method will be like this :

public function update(Request $request, $id)


$project = Project::findOrFail($id);

$project->name = $request->name;

$project->description = $request->description;




If you are using a Route::group, with a vendor plugin like LaravelLocalization (from MCAMARA), you need to put POST routes outside of this group. I’ve experienced problems with POST routes using this plugin and I did solved right now by putting these routes outside Route::group..

Just name your routes.

Route::post(‘/{page}/articles’, AddArticle::class)->name(‘addArticle’);

Not all of the paths need to be written out, just stick to the standard procedures. ITtutoria.net is also available to help with any problem.

We hope you will find the Solution!!!

Check out: Programming Languages For eLearning App Development

Most Popular

More from Author

How to make reels on Instagram?

If you are an Instagram user or want to become a...

How to Make Your Pre Roll Packaging Shine Out

Packaging is one of the main things that does play a...

Logo Maker Mod APK v42.51 (Premium Unlocked)

Logo Maker Mod APK is a mobile application that allows Android...

The Flexibility of Payday Loans Repayment Options

Are you in need of quick financial assistance but worried about...

Read Now

Solar Panels Costs vs Future Savings Calculation Software

Solar energy calculation requires an integrated approach. Several factors need to be taken into account when carrying out this operation: the size and orientation of the solar array, the efficiency of the equipment, and the amount of sunlight that the installation site will receive. It is possible...

Surfshark VPN: A Great Way to Protect Your Online Presence

VPNs can increase your online anonymity by routing your web traffic through an encrypted connection to a faraway server. However, this level of security can come at a cost – in the case of Surfshark VPN, in actual dollars and cents. The Surfshark VPN is our most...

The Fastest Way to Build Your Brand on Instagram in NZ

Instagram is a visual nature and engaged user base market platform for building and promoting your brand in New Zealand. With a solid presence on Instagram, you can showcase your products or services, engage with your followers and potential customers, and establish your brand as a leader in...

Where MOBA Games Fans Can Travel to This Spring

The competitive season will be very busy in 2023. Almost the entire year will be full of big events but spring stands out especially. With the arrival of the first heat, the first top-tier Dota 2 and League of Legends will be hosted. The MOBA game by Valve...

How to Make a Mobile Banking App and Succeed in the Fintech Sector

Mobile banking apps are becoming increasingly popular in recent years due to the steady and increasing demand for Neobanking solutions - which incorporate exclusively online mobile banking solutions to traditional, legacy banking. When seeking the answer to how to make a mobile banking app, fintech start-ups must...

How Does the Credit Card Work?

A credit card is a form of payment for services or products that has a predefined credit limit. Understand how it works. "Debit or on credit?" is one of the most frequent questions in commercial establishments in Brazil.  Even though it is so popular, the credit card can...

Do You Really Need a 4k Monitor To Edit 4k Videos?

It makes sense to acquire a larger display if you want more room to work on your computer. However, finding a solution is the issue. A safe bet resolution should be at the top of your list of features to review. Still, with me, let's proceed to the...

Apple MobileMe Review: Stay Connected Anywhere, Anytime.

Apple MobileMe is a subscription-based online service developed by Apple. It provided users with various online services such as email, online storage, and synchronization of contacts, calendars, bookmarks, and notes across multiple devices. MobileMe was first introduced in 2008 and discontinued in 2012, with its services replaced...

Text-To-Speech Technology: Benefits and Challenges

Text-To-Speech Technology is a powerful tool that has revolutionized the way we communicate and interact with technology. By converting text into speech, it has enabled us to access information faster and more effectively. TTS is used across a wide range of industries and for many different purposes. It...

Excellent mobile apps for editing women’s looks

Users of social networks believe that the current trend is naturalness without filters, but many of them continue to use photo editors. There are many girls for whom it is important to bring a perfect result in their next photo before sharing a new publication on their...

How Technology Has Integrated with the Gaming Industry

Advancement in technology is changing our daily lives in one way or another. We have become so dependent on technology so much today that we end up implementing technology in everything that we do. It makes our lives comfortable and improves them daily, as seen winced the...

The Top 12 Online Marketplaces in the USA

If you want to build your Ecommerce business in 2023, you must utilize online marketplaces. In the United States, retail e-commerce sales doubled from 2017 to 2022, increasing from $425 billion to more than $875 billion. This expansion of e-commerce has a direct effect on all types of...