I have a search bar in view:
{!! Form::open(['name' => 'myForm',
'method' => 'GET',
'action' => 'AreaController@search',
'files' => true,
'onsubmit' => "return validateForm()"])
!!}
{!! Form::submit('جستجو', ['class' => 'btn btn-info']) !!}
{!! Form::close() !!}
And in route file, web.php
:
Route::get('area/search/', 'AreaController@search')->name('area.search');
AreaController
:
public function search(Request $request) {
return " it is working" ;
}
But when I click on the button, the browser is showing a blank page. When I use POST
method it is working, but if I change to GET
method, it is not working.
Thank you.