<?php $__env->startSection('body'); ?>
    <ol class="breadcrumb">
        <li><a href="<?php echo e(action('PucFoodController@index')); ?>">Puc Food</a></li>
        <li class="active">Edit</li>
    </ol>

    <?php echo Form::open(['action' => 'PucFoodController@update']); ?>


    <table class="table table-hover">
        <tr>
            <th class="col-md-2" style="text-align:center">Food ID</th>
            <th class="col-md-5" style="text-align:center">Name</th>
            <th class="col-md-4" style="text-align:center">Type</th>
            <th class="col-md-1"></th>
        </tr>

        <form></form>

        <?php foreach($foods as $food): ?>
            <tr>
                <?php echo Form::input('hidden', 'id[]', $food->id); ?>

                <td class="col-md-2" style="text-align:center"><?php echo e($food->id); ?></td>
                <td class="col-md-5">
                    <?php echo Form::text('name[]', $food->name, ['class' => 'form-control text-center']); ?>

                </td>
                <td class="col-md-4">
                    <?php echo Form::select('type[]', ['good' => 'good', 'bad' => 'bad', 'neutral' => 'neutral'],
                        $food->type, ['class' => 'form-control text-center']); ?>

                </td>
                <td class="col-md-1">
                    <a href="<?php echo e(action('PucFoodController@destroy', ['id' => $food->id])); ?>" class="btn btn-danger">
                        <span class="glyphicon glyphicon-remove" aria-hidden="true"></span>
                    </a>
                </td>
            </tr>
        <?php endforeach; ?>

    </table>

    <div class="row">
        <div class="text-center">
            <button class="btn btn-primary" type="submit">Save</button>
        </div>
    </div>

    <?php echo Form::close(); ?>


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