title: The POST method is not supported for this route. Supported methods: GET, HEAD, PUT, PATCH, DELETE. in Laravel 8
body: <p>I'm getting this error when I'm trying to register something from a form. I'm going to post the code and after that explain the situation</p>
  <p><strong>View Code</strong></p>
  <pre><code>@extends('layouts.app')
  
  @section('content')
  &lt;div class=&quot;container&quot;&gt;
  
      &lt;h1&gt;Crear Especialidad&lt;/h1&gt;
      &lt;div class=&quot;row justify-content-center&quot;&gt;
          &lt;div class=&quot;col-md-8&quot;&gt;
              &lt;div class=&quot;card&quot;&gt;
                  &lt;div class=&quot;card-header&quot;&gt;{{ __('Register') }}&lt;/div&gt;
  
                  &lt;div class=&quot;card-body&quot;&gt;
                      &lt;form method=&quot;POST&quot; action=&quot;{{ route('especialidades.create') }}&quot;&gt;
                          @csrf
                          &lt;div class=&quot;form-group row&quot;&gt;
                              &lt;label for=&quot;nombre&quot; class=&quot;col-md-4 col-form-label text-md-right&quot;&gt;{{ __('Nombre') }}&lt;/label&gt;
                              
                              &lt;div class=&quot;col-md-6&quot;&gt;
                                  &lt;input id=&quot;nombre&quot; type=&quot;text&quot; class=&quot;form-control @error('nombre') is-invalid @enderror&quot; name=&quot;nombre&quot; value=&quot;{{ old('nombre') }}&quot; required autocomplete=&quot;nombre&quot; autofocus&gt;
  
                                  @error('nombre')
                                      &lt;span class=&quot;invalid-feedback&quot; role=&quot;alert&quot;&gt;
                                          &lt;strong&gt;{{ $message }}&lt;/strong&gt;
                                      &lt;/span&gt;
                                  @enderror
                              &lt;/div&gt;
                          &lt;/div&gt;
                          
                          &lt;div class=&quot;form-group row mb-0&quot;&gt;
                              &lt;div class=&quot;col-md-6 offset-md-4&quot;&gt;
                                  &lt;button type=&quot;submit&quot; class=&quot;btn btn-primary&quot;&gt;
                                      {{ __('Registrar') }}
                                  &lt;/button&gt;
                              &lt;/div&gt;
                          &lt;/div&gt;
                      &lt;/form&gt;
                  &lt;/div&gt;
              &lt;/div&gt;
          &lt;/div&gt;
      &lt;/div&gt;
  &lt;/div&gt;
  @endsection
  </code></pre>
  <p><strong>Controller code</strong></p>
  <pre><code> public function create(array $data)
      {
          return Especialidades::create($data);  
      }
  </code></pre>
  <p><strong>Routes</strong></p>
  <pre><code>Route::get('/', function () {
      return view('welcome');
  });
  
  Auth::routes();
  
  Route::get('/home', [App\Http\Controllers\HomeController::class, 'index'])-&gt;name('home');
  Route::get('/nuevaEspecialidad', [EspecialidadesController::class,'nuevo'])-&gt;name('nuevaEspecialidad');
  Route::resource('/especialidades', EspecialidadesController::class);
  Route::get('/gestionarMedicos', [PersonaController::class,'mostrarMedicos'])-&gt;name('personaMostrarMedicos');
  </code></pre>
  <p>Dunno if it is a problem with overwriting or something similar but the resource route should support post for the create function. I'm trying to insert the data from the form, a name as you can see in the view to the database.<br />
  I'm new on Laravel so dunno what can be the cause. I will gladly provide you with extra code if needed or explain better the situation if it isn't explained enough.</p>