<?php $__env->startSection('content'); ?>
    <div class="row">
                	<div id="breadcrumb" class="col-xs-12">
                		<a href="#" class="show-sidebar">
                			<i class="fa fa-bars"></i>
                		</a>
                		<ol class="breadcrumb pull-left">
                			<li><a href="">Visitors</a></li>
                		</ol>
                	</div>
                </div>


 <div class="row">
            	<div class="col-xs-12 col-sm-12">
        		<div class="box">
        			<div class="box-header">
        				<div class="box-name">
        					<i class="fa fa-plus"></i>
        					<span>Registration</span>
        				</div>
        				<div class="box-icons">
        					<a class="collapse-link">
        						<i class="fa fa-chevron-up"></i>
        					</a>
        				</div>
        				<div class="no-move"></div>
        			</div>
        			<div class="box-content">
        			 <?php echo Form::model($visitor, ['method' => 'visitor' ,
                                                               	'url' => action('VisitorsController@store'),
                                                               	'id'   =>  'defaultForm',
                                                               	'role'  =>  'form',
                                                               	'class' => 'form-horizontal']); ?>

        				<div class="form-group">
        						<label class="col-sm-2 control-label">First name</label>
        						<div class="col-sm-4">
        						<?php echo Form::text("first_name" , null, ['class' => 'form-control',
        						                                    'placeholder'   =>  'First name']); ?>

        						</div>
        						<label class="col-sm-2 control-label">Last name</label>
        						<div class="col-sm-4">
        						<?php echo Form::text("last_name" , null, ['class' => 'form-control',
                                                                   'placeholder'   =>  'Last name']); ?>

        						</div>
        					</div>
        					<div class="form-group">
                                <label class="col-sm-2 control-label">CIN</label>
                                <div class="col-sm-4">
                                <?php echo Form::text("cin" , null, ['class' => 'form-control ',
                                                              'placeholder'      =>  'CIN']); ?>

                                </div>
                                <label class="col-sm-2 control-label">Date Visit</label>
                                <div class="col-sm-4">
                                <?php echo Form::text("date_visit" , null, ['class' => 'form-control',
                                                                     'placeholder'   =>  'Visit date',
                                                                     'id'  =>  'input_date_visit']); ?>

                                </div>
                            </div>
        					<div class="form-group">
        						<label class="col-sm-2 control-label">Phone number</label>
        						<div class="col-sm-4">
        						<?php echo Form::text("mobile" , null, ['class' => 'form-control',
        						                                'placeholder'   =>  'Phone number']); ?>

        						</div>
        						<label class="col-sm-2 control-label">Email</label>
        						<div class="col-sm-4">
        						<?php echo Form::text("email" , null, ['class' => 'form-control',
                                        						 'placeholder'   =>  'Email']); ?>

        						</div>
        					</div>
        					<div class="form-group">
        					    <div class="col-sm-offset-2 col-sm-2">
                                    <button type="submit" class="btn btn-primary btn-label-left">
                                    <span><i class="fa fa-plus"></i></span>
                                    Registrate
                                    </button>
                                </div>
                            </div>
        				<?php echo Form::close(); ?>

        			</div>
        		</div>
        	</div>
        </div>

 	<div class="row">
    	<div class="col-xs-12">
    		<div class="box">
    			<div class="box-header">
    				<div class="box-name">
    					<i class="fa fa-users"></i>
    					<span>List of visitors</span>
    				</div>
    			</div>
    			<div class="box-content no-padding">
    				<table class="td_link table table-bordered table-striped table-hover table-heading table-datatable" id="datatable-1">
    					<thead>
    						<tr>
    							<th class="col-md-1">CIN</th>
    							<th class=" col-md-1">Fist name</th>
    							<th class=" col-md-1">Last name</th>
    							<th class=" col-md-1">Date of Visit</th>
                                <th class="col-md-1">Email</th>
                                <th class="col-md-1">Phone number</th>
    						</tr>
    					</thead>
    					<tbody>
    					<!-- Start: list_row -->
    					<?php foreach($visitors as $visitor): ?>
    					<tr onclick="document.location = '<?php echo e(route('visitor.show', $visitor)); ?>';">
                            <td><?php echo e($visitor->cin); ?></td>
                            <td><?php echo e($visitor->first_name); ?></td>
                            <td><?php echo e($visitor->last_name); ?></td>
                            <td><?php echo e($visitor->date_visit->toDateString()); ?></td>
                            <td><?php echo e($visitor->email); ?></td>
                            <td><?php echo e($visitor->mobile); ?></td>
                        </tr>
                        <?php endforeach; ?>
                        <?php /*<tr>*/ ?>
                        <?php /*<td>12345678</td>*/ ?>
                            <?php /*<td>sedsd</td>*/ ?>
                            <?php /*<td>fsfsdf</td>*/ ?>
                            <?php /*<td>12-09-10123</td>*/ ?>
                            <?php /*<td>dfdfsf.dsfsdf.dfr</td>*/ ?>
                            <?php /*<td>789</td>*/ ?>
                        <?php /*</tr>*/ ?>
                        <?php /*<tr>*/ ?>
                                                <?php /*<td>12345678</td>*/ ?>
                                                    <?php /*<td>sedsd</td>*/ ?>
                                                    <?php /*<td>fsfsdf</td>*/ ?>
                                                    <?php /*<td>12-09-10123</td>*/ ?>
                                                    <?php /*<td>dfdfsf.dsfsdf.dfr</td>*/ ?>
                                                    <?php /*<td>789</td>*/ ?>
                                                <?php /*</tr>*/ ?>
                                                <?php /*<tr>*/ ?>
                                                                        <?php /*<td>12345678</td>*/ ?>
                                                                            <?php /*<td>sedsd</td>*/ ?>
                                                                            <?php /*<td>fsfsdf</td>*/ ?>
                                                                            <?php /*<td>12-09-10123</td>*/ ?>
                                                                            <?php /*<td>dfdfsf.dsfsdf.dfr</td>*/ ?>
                                                                            <?php /*<td>789</td>*/ ?>
                                                                        <?php /*</tr>*/ ?>
    					<!-- End: list_row -->
    					</tbody>
    					<tfoot>
    						<tr>
    							<th>CIN</th>
                                <th>Fist name</th>
                                <th>Last name</th>
                                <th>Date of Visit</th>
                                <th>Email</th>
                                <th>Phone number</th>
    						</tr>
    					</tfoot>
    				</table>
    			</div>
    		</div>
    	</div>
    </div>
 <?php $__env->stopSection(); ?>
<?php echo $__env->make('../shared/default', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>