I want to transfer the input value from one blade file to another click file.
I am new to PHP Laravel and I get an error when trying to use it.
I think my syntax is wrong here. Can anyone help?
channeling.blade:
<select class="form-control " name="fee" id ="fee"></select>
This is a link to the next page where I want to send the value of "fee":
<input type="hidden" value="fee" name="fee" /> <a href="{{ url('pay ') }}">Click to Channel</a></p>
This is my web.php:
Route::post('pay', [ 'as' => 'fee', 'uses' => ' channelController@displayForm ' ]);
This class of my controller is:
public function displayForm() { $input = Input::get(); $fee = $input['fee']; return view('pay', ['fee' => $fee]); }
Error message:
Undefined variable: fee (View: C:\xampp\htdocs\lara_test\resources\views\pay.blade.php)
pay.blade:
<h4>Your Channeling Fee Rs:"{{$fee}}"</h4>
source share