i'm new to laravel framework and i'm looking for how to write Query in order to get the absolute value(in short ignoring the + and - sign and only display number from database. I know we can use Abs in order to get it.But i don't know how do it implement it Take a look at my code:
$users = DB::table('transaction_details')->
Join('ledger','transaction_details.ledger','=','ledger.Name')->
groupBy('ledger.Name')->select('ledger.CrDr as CrDr','transaction_details.ledger
as Name','transaction_details.amount as Debit','ledger.OpeningBalance as
openingBalance')->get();
In above query i want ledger.openingBalance value to be absolute. how do i do that?
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire