

<?php $__env->startSection('title', 'Haberler'); ?>



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





<?php $__env->startSection('_content'); ?>

<div id="component_page">

    <h1 class="title">Haberler Komponenti</h1>



    <?php if(Session::has('message')): ?>

    <div class="alert alert-success"><?php echo Session::get('message'); ?></div>

    <?php endif; ?>

    <?php if($news->count() > 0): ?>

    <table class="table table-hover table-striped">

        <thead>

        <tr>

            <th>Başlık</th>

            <th>Tarih</th>

        </tr>

        </thead>

        <tbody>

        <?php foreach($news as $n): ?>

        <tr>

            <td><a href="<?php echo URL::to('component/news/edit/'. $n->id); ?>"><?php echo $n->title; ?><a></td>

            <td><?php echo $n->created_at; ?></td>

        </tr>

        <?php endforeach; ?>

        </tbody>

    </table>



    <?php echo $news->links(); ?>

    <?php else: ?>

    <div class="alert alert-warning">

        <h4>Hiç Haberiniz yok.</h4> <a href="<?php echo URL::to('component/news/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(); ?>
