Try below given script in welcome.blade.php
file
{!! Form::open(['url' => route('globalcalc.tonperha'),'method'=>'post','id' => 'Calculate']) !!}
this route add in route file
Route::post('/calculate','globalcalc@tonperha')->name('globalcalc.tonperha');
Hope this useful for you !
I figured out the solution.
in my route file /routes/web.php I created a new named route that point to the controller.
Route::post('calctonperha', [ 'as' => 'calctonperha', 'uses' => 'globalcalc@tonperha' ]);
and in my view the following code with form::open
{!! Form::open(array('route' => 'calctonperha')) !!}
Thanks @saurabhd I see you have given almost same solution as I figured out. I did not see it until after it was to late to mark it as solution.
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community