The POST method is not supported for route series/1. Supported methods: GET, HEAD, PUT, PATCH, DELETE.
Acima está o erro acusado, conferir as rotas, o formulário e o controller. Estão todos configurados de forma correta, porém o erro continua.
#index
<x-layout title="Séries">
<a href={{ route('series.create')}} class="btn btn-dark mb-2" >Adicionar</a>
<ul class="list-group">
@foreach ($series as $serie)
<li class="list-group-item d-flex justify-content-between align-items-center">
{{ $serie->nome }}
<form action="{{route('series.destroy', $serie->id)}}" method="post">
@csrf
@method('DELETE')
<button class="btn btn-danger btn-sm">
X
</button>
</form>
</li>
@endforeach
</ul>
</x-layout>
#controller
public function destroy(Request $request)
{
Serie::destroy($request->series);
return to_route('series.index');
}
#route
Route::resource('/series', SeriesController::class)
->only(['index', 'create', 'store', 'destroy']);