Issue
I want to do subtraction operations inside the Laravel blade view. I knew it was the wrong approach I need to do it from the controller, but can someone give me the proper solution to do it directly inside the blade view?
Note: I am a newbie to programming.
Here is my code
@if(!empty($receipt_details->total_due))
<tr>
<th>
Customer Old Due
</th>
<td>
{{$receipt_details->all_due}} - {{$receipt_details->total_due}}
</td>
</tr>
@endif
Solution
you can add it at the same {{}}
like this one
{{$receipt_details->all_due - $receipt_details->total_due}}
Answered By - Joseph
0 Comments:
Post a Comment
Note: Only a member of this blog may post a comment.