MethodNotAllowedHttpException in RouteCollection.php - Laravel 5.4

1

I got this error when putting a project on the server and trying to insert a product into the database.

Error

  

Whoops, looks like something went wrong. (1/1)   MethodNotAllowedHttpException in RouteCollection.php (line 251)

Web.php     

route::GET('/','ProdutoController@lista');

Route::GET('/welcome', function () {
    return view('welcome');
});
Route::group(['prefix' => 'produtos'], function(){
    Route::GET('/', 'ProdutoController@lista');
    Route::GET('/json', 'ProdutoController@listaJson');
    Route::GET('/mostra/{id}', 'ProdutoController@mostra');
    Route::GET('/novo', 'ProdutoController@novo');
    Route::POST('/adiciona', 'ProdutoController@adiciona');
    Route::GET('/remove/{id}', 'ProdutoController@remove');
});

Route::GET('/leitura', 'ProdutoController@LerTXT');
Route::GET('/login', 'LoginController@form');
Route::POST('/login', 'LoginController@login');

Page that gives the error:

@extends('principal')

@section('conteudo')

<h1>Novo produto</h1>

@if($errors->any())
    <div class="alert alert-danger">
    <ul>
        @foreach($errors->all() as $error)
            <li>{{$error}}</li>
        @endforeach
    </ul>
    </div>
@endif

<form action="/produtos/adiciona/" method="POST">

    <input type="hidden" name="_token" value="{{csrf_token()}}">

    <div class="form-group">
        <label>Nome</label>
        <input class="form-control" value="{{ old('nome')}}" type="text" name="nome">
    </div>

    <div class="form-group">
        <label>Valor</label>
        <input class="form-control" value="{{ old('valor')}}" type="number" name="valor">
    </div>

    <div class="form-group">
        <label>Quantidade em estoque</label>
        <input class="form-control" value="{{ old('quantidade')}}" type="number" name="quantidade">
    </div>

    <div class="form-group">
        <label>Tamanho</label>
        <input class="form-control" value="{{ old('tamanho')}}" type="text" name="tamanho">
    </div>

    <div class="form-group">
        <label>Categoria</label>
        <select class="form-control" type="text" name="categoria_id">
            @foreach($categorias as $c)
                <option value="{{$c->id}}">{{$c->nome}}</option>
            @endforeach
        </select>
    </div>

    <div class="form-group">
        <label>Descricao</label>
        <textarea class="form-control" value="{{ old('descricao')}}" name="descricao"></textarea>
    </div>

    <button type="submit" class="btn btn-primary">Adicionar</button>
</form>
@stop

When I was on my machine I was running quietly, on my pc runs 7.1.1 php and on the 7.0 wheel server

    
asked by anonymous 11.08.2017 / 06:04

0 answers