Exemplo n.º 1
0
<?php

$totals = \App\School::totals(Session::get('event')->id);
$advisor = \App\Advisor::find(Session::get('advisor'));
$total = $totals->flatten()->sum();
?>
<div class="widget stacked">
    <div class="widget-header">
        <i class="icon-star"></i>
        <h3>Invoice Summary</h3>
    </div> <!-- /widget-header -->
    <div class="widget-content">
        <table class="table">
            @foreach ($totals as $role => $charges)
                <tr>
                    <th align="right">{{ str_plural(\App\Role::find($role)->name) }}</th>
                    <td>{{ count($charges) }}</td>
                    <td>x ${{ \App\Role::find($role)->cost }} =</td>
                    <td align="right">${{ collect($charges)->sum() }}.00</td>
                </tr>
            @endforeach
            <tr>
                <th align="right">Total</th>
                <td colspan="3" align="right"><big><strong>${{ \App\School::total() }}.00</strong></big></td>
            </tr>
        </table>
    </div>
</div>