Jump to content

Bozzo

New Members
  • Posts

    1
  • Joined

  • Last visited

Bozzo's Achievements

Newbie

Newbie (1/5)

0

Reputation

  1. Hi all, I'm trying to order a list by Id and ascending and i dont figure out how, everything i try is not working! please help this is the link with ejemplo: Producto 3 was last inserted and it showing appear first... and should appear last... http://rumnorte.es/office/estimate/8cea8fec621d501c0f3e560fabe120ead56d4755 Here is the code: <?php foreach (DB::table('options')->get() as $o) { $data[$o->option_name] = "".$o->option_value.""; } ?> <tbody> <?php $total=0; $index = 1; $totalfinal = 0; ?> @foreach ($products as $pro) <tr> <td>{{$index}}</td> <td> <dl> <dt>{{ $pro->product_name }}</dt> <dd>{{ $pro->product_description }}</dd> </dl> </td> <td class="text-right">{{ $pro->unit }}</td> <td class="text-right"><?php echo $data['currencysymbol']; ?> <?php echo number_format($pro->cost, 2, '.', ','); ?></td> <td class="text-right"><?php echo $data['currencysymbol']; ?> <?php echo number_format($pro->unit*$pro->cost, 2, '.', ','); ?></td> </tr> <?php $total += $pro->unit*$pro->cost; $index++; ?> @endforeach </tbody> Any advice really welcome!
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.