<?php $__env->startSection('content'); ?>
<div class="container-fluid">
	<div class="row">
		<div class="col-md-8 col-md-offset-2">
			<div class="panel panel-default">
				<div class="panel-heading">Edit Milestone</div>
				<div class="panel-body">
					<?php if(count($errors) > 0): ?>
						<div class="alert alert-danger">
							<strong>Whoops!</strong> There were some problems with your input.<br><br>
							<ul>
								<?php foreach($errors->all() as $error): ?>
									<li><?php echo e($error); ?></li>
								<?php endforeach; ?>
							</ul>
						</div>
					<?php endif; ?>

				 <?php if(Session::has('message')): ?>
						<div class="alert alert-success">
							<strong>Status!</strong>  <?php echo e(Session('message')); ?> 
        				</div>
					<?php endif; ?>



                     <?php foreach($milestones as $milestone): ?>
					<form class="form-horizontal" role="form" method="POST" action="<?php echo e(url('/milestones/update')); ?>">
						<input type="hidden" name="_token" value="<?php echo e(csrf_token()); ?>">
<input name="id" type="hidden" value="<?php echo e($milestone->id); ?>">
						<div class="form-group">
							<label class="col-md-4 control-label">Milestone</label>
							<div class="col-md-6">
								<input type="text" class="form-control" name="milestone" value="<?php echo e($milestone->milestone); ?>">
							</div>
						</div>
                       	<div class="form-group">
							<label class="col-md-4 control-label">Group</label>
							<div class="col-md-6">
                            <select class="form-control" name="group">
  <option value="<?php echo e($milestone->group->id); ?>" selected><?php echo e($milestone->group->category); ?></option>
    <?php foreach($group as $groups): ?>
  <option value="<?php echo e($groups->id); ?> "><?php echo e($groups->category); ?></option>
  <?php endforeach; ?>
</select>

							</div>
						</div>


						<div class="form-group">
							<div class="col-md-6 col-md-offset-4">
								<button type="submit" class="btn btn-primary">
									Update
								</button>
                                <a class="btn btn-default" href="<?php echo e(url('/milestones/all')); ?>">
Cancel
								</a>
							</div>
						</div>
					</form>
                        <?php endforeach; ?>
				</div>
			</div>
		</div>
	</div>
</div>
<?php $__env->stopSection(); ?>

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