<?php $__env->startSection('content'); ?>
<div class="col-md-12 content-header" >
    <h1><i class="fa fa-credit-card"></i> Expenses</h1>
</div>

<section class="content">
    <div class="row">
        <div class="col-md-12">
            <!--    Hover Rows  -->
            <a href="<?php echo e(route('expenses.create')); ?>" class="btn btn-primary btn-sm pull-right" data-toggle="ajax-modal"> <i class="fa fa-plus"></i> New Expense</a> <br/><br/>
            <?php if(Session::has('flash_notification.message')): ?>
            <?php echo message(); ?>

            <?php endif; ?>
            <div class="panel panel-default">
                <div class="panel-heading">
                    Expenses
                </div>
                <div class="panel-body">
                    <table class="table table-bordered table-striped table-hover datatable">
                        <thead>
                        <tr>
                            <th></th>
                            <th>Name</th>
                            <th>Date</th>
                            <th>Category</th>
                            <th>Amount</th>
                            <th>Action </th>
                        </tr>
                        </thead>
                        <tbody>
                        <?php foreach($expenses as $expense): ?>
                        <tr>
                            <td></td>
                            <td><?php echo e($expense->name); ?> </td>
                            <td><?php echo e($expense->expense_date); ?> </td>
                            <td><?php echo e($expense->category); ?> </td>
                            <td><?php echo e($expense->amount); ?> </td>
                            <td>
                                <?php echo edit_btn('expenses.edit', $expense->id); ?>

                                <?php echo delete_btn('expenses.destroy', $expense->id); ?>

                            </td>
                        </tr>
                        <?php endforeach; ?>
                        </tbody>
                    </table>
                </div>
            </div>
            <!-- End  Hover Rows  -->
        </div>
    </div>
</section>
<?php $__env->stopSection(); ?>

<?php echo $__env->make('app', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>