Eu fiz um metodo que funciona local mas não funciona publicado.
Quando eu executo o metodo "consultar" da esse erro: MethodNotAllowedHttpException
Segue abaixo codigo
paciente.blade.php
@extends('app')
@section('content')
<form action="/paciente/consulta/" method="post">
<div class="row">
<div class="col-lg-6">
<div class="input-group">
<input type="hidden" name="_token" value="{{{ csrf_token() }}}">
<input type="text" class="form-control" name="campobusca" placeholder="Nome do Paciente...">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">Pesquisar! <span class="glyphicon glyphicon-filter"></span></button>
</span>
<span class="input-group-btn">
<a class="btn btn-default" href="/paciente/novo/">Novo <span class="glyphicon glyphicon-plus"></span> </a>
</span>
</div><!-- /input-group -->
</div><!-- /.col-lg-6 -->
</div>
</form>
<table class="table table-striped table-bordered">
<tr>
<td width=5%>Código</td>
<td width=60%>Nome</td>
<td width=10%>CPF</td>
<td width=5%></td>
<td width=5%></td>
<td width=5%></td>
<td width=5%></td>
</tr>
<?php
foreach($lista_paciente as $paciente) :
?>
<tr>
<td ><?= $paciente['id'] ?></td>
<td><?= substr($paciente['nome'], 0, 40) ?></td>
<td><?= $paciente['cpf'] ?></td>
<td>
<a class="btn btn-sm btn-warning" href="/paciente/altera/<?=$paciente['id']?>">Alterar <span class="glyphicon glyphicon-edit"></span> </a>
</td>
<td>
<a class="btn btn-sm btn-danger" href="/paciente/remove/<?=$paciente['id']?>">Excluir <span class="glyphicon glyphicon-trash"></span> </a>
</td>
<td>
<a class="btn btn-sm btn-success" href="/paciente/relatorioprincipal/<?=$paciente['id']?>"><i class="fa fa-eye" target="_blank"></i>Impressão Principal <span class="glyphicon glyphicon-print"></span> </a>
</td>
<td>
<a class="btn btn-sm btn-success" href="/paciente/relatorioparcial/<?=$paciente['id']?>"><i class="fa fa-eye" target="_blank"></i>Impressão Parcial <span class="glyphicon glyphicon-print"></span></a>
</td>
</tr>
<?php
endforeach
?>
</table>
@endsection
PacienteController.php
public function consulta(){
$filtro=Request::input('campobusca');
$paciente = Paciente::where('nome','LIKE',"%{$filtro}%")->get();
return view('paciente.paciente')->with('lista_paciente',$paciente);
}
routes.php
Route::post('/paciente/consulta/', 'PacienteController@consulta');
Desde já, Obrigado.