I want to display sum of column debit but when i pass data after sum value of column store in varibale, I pass the data from controller to view but laravel said its undefined can anyone help me with this ?
View.blade.php
<tr>
<th>Total Debit:</th>
<td>
@foreach ($totaldebit as $tdebit)
@endforeach
</td>
</tr>
UserController.php
$tdebit = DB::table('debitemps')->sum('debit');
return view('pages/payments/debit/debit',['workerlists'=>$data,'debitid'=>$id,'Empdebitdata'=>$dataEmp,'totaldebit'=>$tdebit]);
from Newest questions tagged laravel-5 - Stack Overflow https://ift.tt/9oWzxQ5
via IFTTT
Aucun commentaire:
Enregistrer un commentaire