I have a food ordering web application and I am trying to deduct the total amount of an order from my wallet. The total amount is saved in the "payment.blade.php" page using the following variable.
Total Amount: @{{ withDelivery }}
I have created a function, "pay_with_wallet($total)" in the Wallet controller that takes the total amount of the order as a parameter and returns a deducted amount from the wallet. But the total is not being passed to the function "pay_with_wallet($total)" from the "payment.blade.php" page.
Can anybody tell me how to what type of variable "@{{ withDelivery }}" this is? And how can I pass it in a static function in my Wallet Controller?
My Answer:
This variable is likely a numeric variable, as it is storing the total amount of an order. In Laravel 5.8, you can use a numeric variable to store the total amount of an order and deduct it from the wallet balance.
Rate this post
3 of 5 based on 8351 votesComments