I am making a table with actions of habilitar
and deshabilitar
when clicking on the buttons the url sends me with its respective id but the function does not call me in the controller.
Route::get('/admin/votos/all/{id}/deshabiliar','NombrevotosController@deshabiliar');
Route::get('/admin/votos/all/{id}/habilitar','NombrevotosController@habilitar');
I do not know if I'll be misplacing the routes
@foreach ($proyectos as $proyecto)
<tr>
<td>{{$proyecto->id}}</td>
<td>{{$proyecto->nombre}}</td>
<td>
@if ($proyecto->acciones == 'Habilitado')
@if ($proyecto->acciones == 'Habilitado')
<form action="{{url('/admin/votos/all/'.$proyecto->id.'/deshabilitar')}}" method="post">
<input type="submit" class="btn btn-primary" name="id" value="deshabilitar">
</form>
@else
<form action="{{url('/admin/votos/all/'.$proyecto->id.'/habilitar')}}" method="post">
<input class="btn btn-danger" type="submit" name="id" value="habilitar">
</form>
@endif
</td>
</tr>
@endforeach