Laravel - How to call a different action from store, update, edit?

2

I created a action but not the default of resource , as I can call it by an action in form as I call update and store .

<form method="POST" role="form" action="{!!URL::route('cadastro.store')!!}" >

I want to call a query when clicking an example

<form method="POST" role="form" action="{!!URL('cadastro.consulta')!!}">
    
asked by anonymous 02.12.2016 / 00:16

1 answer

2

Opens the route file and creates a Route::post as follows:

Route::post('consulta', [
    'as' => 'cadastro.consulta', 
    'uses' => 'cadastrarController@pesquisar']
);

Reference:

02.12.2016 / 00:26