I'm getting this error
Missing required parameters for [Route: payment.checkPayment] [URI: {unique_link}/{paymentrequest}/{info}].
Here I encode the array. Note is optional, is also nullable in database.
$info = json_encode(["name" => $request->name, "note" => $request->note]);
This is where I'm sending it to the route
route('payment.checkPayment', [$uniquelink, $paymentrequest, $info])
Route
Route::get('/{unique_link}/{paymentrequest}/{info}', ['as' => 'payment.checkPayment', 'uses' => 'PaymentController@checkPayment']);
How would I fix this? It seems to me I'm sending all of the parameters.
You need to use key-value arrays instead of array-lists as you do:
use:
route('payment.checkPayment', ['unique_link'=>$uniquelink, 'paymentrequest'=>$paymentrequest, 'info'=>$info]);
Reference Laravel Named routes
NOTE it seems you use json-encoded value for the info field, but NOT SURE if this will generate a valid URI. Better check it.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With