
<?php $__env->startSection('title', 'Ürünler'); ?>

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


<?php $__env->startSection('_content'); ?>
<div id="component_page">
    <h1 class="title">Ürünler Komponenti</h1>

    <?php if(Session::has('message')): ?>
    <div class="alert alert-success"><?php echo Session::get('message'); ?></div>
    <?php endif; ?>
    <?php if($product->count() > 0): ?>
    <table class="table table-hover table-striped">
        <thead>
        <tr>
            <th>Başlık</th>
            <th>Kategori</th>
            <th>Eklenme Tarihi</th>
        </tr>
        </thead>
        <tbody>
        <?php foreach($product as $p): ?>
        <tr>
            <td><a href="<?php echo URL::to('component/product/edit/'. $p->id); ?>"><?php echo $p->title; ?><a></td>
            <td><?php echo $p->category->title; ?></td>
            <td><abbr class="timeago" title="<?php echo $p->created_at; ?>"><?php echo $p->created_at; ?></abbr></td>
        </tr>
        <?php endforeach; ?>
        </tbody>
    </table>

    <?php echo $product->links(); ?>
    <?php else: ?>
    <div class="alert alert-warning">
        <h4>Hiç Ürün yok.</h4> <a href="<?php echo URL::to('component/product/create'); ?>" class="alert-link">Buradan ekleyin</a>
    </div>
    <?php endif; ?>


</div>
<?php $__env->stopSection(); ?>
<?php echo $__env->make('layouts.wrap', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>