laravel routes error

-3

I have the following route

Route::post('guardar_registro', 'Frontoffice\Perfil_paciente\completar_registroController@guardar_registro');

and the next form

<form action="{{ url('guardar_registro') }}"  method="POST" accept-charset="utf-8" autocomplete="off" >

but can not find the route when sending the submit

    
asked by Jon Solis 13.12.2018 в 22:35
source

1 answer

0

I prefer to declare the routes in this way:

Route::post('conceptos-de-pagos/guardar', [
    'as' => 'conceptos-pagos.store', // agrego un alias a la ruta para acceder a las vistas
    'uses' => 'ConceptosPagosController@store'  // hago referencia a la acción "store" del controlador
    ]); 

To occupy them like this:

{{ route("conceptos-pagos.store}}' // utilizo el alias de la ruta en las vistas
    
answered by 14.12.2018 в 19:07