<?php $__env->startSection('title'); ?>
    <?php echo e(ucfirst('Home')); ?>

<?php $__env->stopSection(); ?>

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

  <!-- MAIN CONTENT -->
  <div class="container-fluid">
  	<div class="row">

      
  		<div class="col-xs-12">
  			<section id="message-carousel" class="panel panel-primary">
					<header class="panel-heading" style="display: flex;justify-content: space-between;align-content: center;">
            <?php if($homeBanner === 'carousel'): ?>
              <h2>
                <?php echo app('translator')->getFromJson('backend.carousel'); ?>
                <button class="btn btn-success" data-toggle="modal" data-target="#addCarousel"><?php echo app('translator')->getFromJson('backend.add-image'); ?></button>
                <button class="btn btn-warning" data-toggle="modal" data-target="#reorder"><?php echo app('translator')->getFromJson('backend.arange-order'); ?></button>
              </h2>
            <?php endif; ?>
            <?php if($homeBanner === 'video'): ?>
              <h2>Video</h2>
            <?php endif; ?>
            <div>
              <form action="<?php echo e(route('beHomeUpdateBanner')); ?>" method="post" id="home-banner">
                
                <?php echo e(method_field('post')); ?>

                <?php echo e(csrf_field()); ?>


                <div class="form-group">
                  <select name="home_banner" class="form-control"
                    onchange="document.getElementById('home-banner').submit();"
                    >
                    <option value="carousel" <?php echo e($homeBanner == 'carousel' ? 'selected' : ''); ?>>Carousel</option>
                    <option value="video" <?php echo e($homeBanner == 'video' ? 'selected' : ''); ?>>Video</option>
                  </select>
                </div>

              </form>
            </div>
					</header>
					<div class="panel-body">
            <?php if ($__env->exists("backend.home_components.{$homeBanner}")) echo $__env->make("backend.home_components.{$homeBanner}", array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
					</div>
	    	</section>

        <?php $__currentLoopData = $carousel; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <div id="update<?php echo e($val->id); ?>" class="modal fade" role="dialog">
            <div class="modal-dialog modal-lg">

            <?php echo Form::open(['url' => route('beHomeSaveCarousel'),'method'=>'post','files'=>true, 'class' => 'image-form']); ?>

              <?php echo Form::hidden('carousel_id',$val->id); ?>

              <?php echo Form::hidden('image'); ?>

              <div class="modal-content">
                <div class="modal-header">
                  <h2><?php echo app('translator')->getFromJson('backend.update-image'); ?></h2>
                </div>
                <div class="modal-body text-center">

                  
                  <div class="" style="width: 800px; margin: 0 auto 20px auto;">
                    <div class="image-cropper" data-height="287.5" data-width="800" data-exportZoom="2"
                     data-src="<?php echo e(asset($storage_url.'img/home/'.$val->media_url)); ?>">
                      <div class="cropit-preview"></div>

                      <div class="controls-wrapper" >
                        <div class="rotation-btns">
                          <a class="rotate-ccw-btn"><i class="fa fa-undo"></i></a>
                          <a class="rotate-cw-btn"><i class="fa fa-repeat"></i></a>
                        </div>
                        <div class="slider-wrapper">
                          <i class="fa fa-picture-o" aria-hidden="true"></i>
                          <input type="range" class="cropit-image-zoom-input">
                          <i class="fa fa-picture-o fa-2x" aria-hidden="true"></i>
                        </div>
                      </div>

                      <label for="cropit-image-input" class="btn btn-primary btn-outlined"><?php echo app('translator')->getFromJson('backend.upload'); ?></label>
                      <input type="file" class="cropit-image-input" style="display:none"/>

                      <button title="<?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?>" type="button" class="btn btn-primary btn-outlined js-pixabay-trigger"><?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?></button>

                    </div>
                  </div>
                  

                  <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php 
                      if(count(config('translatable.locales')) > 1){
                        $lang_ext = $language;
                      }else{
                        $lang_ext = "";
                      }

                      $get = $val->locales()->where('locale',$lang)->first();
                      if(!empty($get)){
                        $title = $get->media_title;
                        $alt = $get->media_content;
                      }else{
                        $title = $val->media_title;
                        $alt = $val->media_content;
                      }
                     ?>
                    <div class="panel panel-info">
                      <div class="panel-heading">
                        <h3><?php echo e(count(config('translatable.locales')) > 1 ? $lang_ext : ""); ?></h3>
                      </div>
                      <div class="panel-body">
                        <div class="form-group">
                          <?php echo Form::label('imagetitle',__('backend.title'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('imagetitle') ? ' has-error' : ''); ?>">
                            <?php echo Form::text('imagetitle['.$lang.']',$title,['class'=>'form-control']); ?>

                            <?php if($errors->has('imagetitle')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('imagetitle')); ?></strong>
                                </span>
                            <?php endif; ?>
                          </div>
                        </div>
                        <div class="form-group">
                          <?php echo Form::label('imagealt',__('backend.seo'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('imagealt') ? ' has-error' : ''); ?>">
                            <?php echo Form::text('imagealt['.$lang.']',$alt,['class'=>'form-control']); ?>

                            <?php if($errors->has('imagealt')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('imagealt')); ?></strong>
                                </span>
                            <?php endif; ?>
                          </div>
                        </div>
                      </div>
                    </div>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
                <footer class="modal-footer">
                  <button type="submit" class="btn btn-primary btn-image-submit"><?php echo app('translator')->getFromJson('backend.save'); ?></button>
                  <button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
                </footer>
              </div>
            <?php echo Form::close(); ?>


            </div>
          </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

	    	
	    	<div id="addCarousel" class="modal fade" role="dialog">
					<div class="modal-dialog modal-lg">

  				  <?php echo Form::open(['url' => route('beHomeSaveCarousel'),'method'=>'post','files'=>true, 'class' => 'image-form']); ?>

  						<?php echo Form::hidden('id','1'); ?>

              <?php echo Form::hidden('image'); ?>

  						<div class="modal-content">
  							<div class="modal-header">
  								<h2><?php echo app('translator')->getFromJson('backend.add-image'); ?></h2>
  							</div>
  							<div class="modal-body text-center">

                
                <div class="" style="width: 800px; margin: 0 auto 20px auto;">
                  <div class="image-cropper" data-height="287.5" data-width="800" data-exportZoom="2">
                    <div class="cropit-preview">
                      <div class="caption">
                        <p><?php echo app('translator')->getFromJson('backend.minimum-resolution'); ?> 1600x575 px</p>
                      </div>
                    </div>

                    <div class="controls-wrapper">
                      <div class="rotation-btns">
                        <a class="rotate-ccw-btn"><i class="fa fa-undo"></i></a>
                        <a class="rotate-cw-btn"><i class="fa fa-repeat"></i></a>
                      </div>
                      <div class="slider-wrapper">
                        <i class="fa fa-picture-o" aria-hidden="true"></i>
                        <input type="range" class="cropit-image-zoom-input">
                        <i class="fa fa-picture-o fa-2x" aria-hidden="true"></i>
                      </div>
                    </div>

                    <label for="cropit-image-input" class="btn btn-primary btn-outlined"><?php echo app('translator')->getFromJson('backend.upload'); ?></label>
                    <input type="file" class="cropit-image-input" style="display:none"/>

                    <button title="<?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?>" type="button" class="btn btn-primary btn-outlined js-pixabay-trigger"><?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?></button>
                  </div>
                </div>
                

                  <?php if($errors->has('imagefile')): ?>
                    <span class="help-block">
                      <strong><?php echo e($errors->first('imagefile')); ?></strong>
                    </span>
                  <?php endif; ?>

                  <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php 
                      if(count(config('translatable.locales')) > 1){
                        $lang_ext = $language;
                      }else{
                        $lang_ext = "";
                      }
                     ?>
                    <div class="panel panel-info">
                      <div class="panel-heading">
                        <h3><?php echo e($lang_ext); ?></h3>
                      </div>
                      <div class="panel-body">
                        <div class="form-group">
                          <?php echo Form::label('imagetitle',__('backend.title'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('imagetitle') ? ' has-error' : ''); ?>">
                            <?php echo Form::text('imagetitle['.$lang.']','',['class'=>'form-control']); ?>

                            <?php if($errors->has('imagetitle')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('imagetitle')); ?></strong>
                                </span>
                            <?php endif; ?>
                          </div>
                        </div>
                        <div class="form-group">
                          <?php echo Form::label('imagealt',__('backend.seo'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('imagealt') ? ' has-error' : ''); ?>">
                            <?php echo Form::text('imagealt['.$lang.']','',['class'=>'form-control']); ?>

                            <?php if($errors->has('imagealt')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('imagealt')); ?></strong>
                                </span>
                            <?php endif; ?>
                          </div>
                        </div>
                      </div>
                    </div>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
  							</div>
  							<footer class="modal-footer">
  								<button type="submit" class="btn btn-primary btn-image-submit"><?php echo app('translator')->getFromJson('backend.save'); ?></button>
  								<button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
  							</footer>
  						</div>
  					<?php echo Form::close(); ?>


					</div>
				</div>

        
        <div id="reorder" class="modal fade" role="dialog">
          <div class="modal-dialog">

            <?php echo Form::open(['url' => route('beHomeOrderCarousel'),'method'=>'post']); ?>

              <div class="modal-content">
                <div class="modal-header">
                  <h2><?php echo app('translator')->getFromJson('backend.rearrange-order'); ?></h2>
                </div>
                <div class="modal-body">
                  <ul class="sortable media-list">
                    <?php $__currentLoopData = $carousel; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $x => $vals): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php 
                          $get = $vals->locales()->where('locale',config('app.locale'))->first();
                         ?>
                      <li class="media">
                        <?php echo Form::hidden('reorder[]',$vals->id); ?>

                        <div class="media-left">
                          <a href="#">
                            <img class="media-object" src="<?php echo e(asset($storage_url.'img/home/'.$vals->media_url)); ?>" alt="" height="64px">
                          </a>
                        </div>
                        <div class="media-body">
                          <h4 class="media-heading">( <?php echo e($vals->temp_id); ?> )<?php echo e(isset($get->media_title) ? $get->media_title : $vals->media_title); ?></h4>
                          <?php echo e(isset($get->media_section) ? $get->media_section : $vals->media_section); ?>

                        </div>
                      </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </ul>
                </div>
                <footer class="modal-footer">
                  <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('backend.save'); ?></button>
                  <button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
                </footer>
              </div>
            <?php echo Form::close(); ?>


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

      
      <?php if(config('corepackage.catalog.featured_products')): ?>
      <div class="col-xs-12">
        <section id="message-home-featured" class="panel panel-primary">
          <header class="panel-heading">
            <h2>
              <?php echo app('translator')->getFromJson('backend.featured-product'); ?>
            </h2>
          </header>

          <?php echo Form::open(['url' => route('beHomeSaveFeaturedHeading'),'method'=>'post']); ?>

            <?php echo Form::hidden('id',isset($featured_product->id)?$featured_product->id:''); ?>

            <div class="panel-body">
              <?php if(Session::has('message-home-featured')): ?>
                <div class="alert <?php echo e(Session::get('alert-class')); ?> alert-dismissible" role="alert">
                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <p><?php echo e(Session::get('message-home-featured')); ?></p>
                </div>
              <?php endif; ?>

              <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php 
                  if(count(config('translatable.locales')) > 1){
                    $lang_ext = $language;
                  }else{
                    $lang_ext = "";
                  }
                  $data = $featured_product->locales()->where('locale',$lang)->first();
                  if(isset($data)){
                    $title = $data->general_title;
                  }else{
                    $title = $featured_product->general_title;
                  }
                 ?>
                <div class="col-xs-12 col-sm-6 <?php echo e((count(config('translatable.locales')) == 1) ? 'col-sm-offset-3' : ''); ?>">
                  <div class="panel panel-info">
                  <div class="panel-heading text-center">
                    <h3><?php echo e($lang_ext); ?></h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <?php echo Form::label('title',__('backend.title'),['class'=>'control-label']); ?>

                      <div class="<?php echo e($errors->has('title') ? ' has-error' : ''); ?>">
                        <?php echo Form::text('title['.$lang.']',$title,['class'=>'form-control']); ?>

                        <?php if($errors->has('title')): ?>
                            <span class="help-block">
                                <strong><?php echo e($errors->first('title')); ?></strong>
                            </span>
                        <?php endif; ?>
                      </div>
                    </div>
                  </div>
                </div>
                </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            <footer class="panel-footer text-center">
              <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('backend.update'); ?></button>
            </footer>
          <?php echo Form::close(); ?>


          <div class="panel-body">

            <div class="table-responsive">
			    		<table id="featuredTable" class="table table-hover">
						    <thead>
							    <tr>
							    	<th class="text-center">#</th>
							      <th class="text-center"><?php echo app('translator')->getFromJson('backend.image'); ?></th>
							      <th class="text-center"><?php echo app('translator')->getFromJson('backend.name'); ?></th>
							      <th class="text-center"><?php echo app('translator')->getFromJson('backend.category'); ?></th>
							      <th class="text-center"><?php echo app('translator')->getFromJson('backend.actions'); ?></th>
							    </tr>
						    </thead>
						    <tbody>
							    <?php $__currentLoopData = $featured; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
								    <tr>
								    	<td class="text-center"><?php echo e($key+1); ?></td>
                      <td class="text-center">
                        <img class="img img-responsive" alt="image" src="<?php echo e(asset($storage_url.'img/products/'.$val->product_code.'/'.$val->product_image)); ?>" style="max-height: 200px;margin: 0 auto; width: auto;">
                      </td>
                      <td class="text-center"><?php echo e($val->product_name); ?></td>
                      <td class="text-center"><?php echo e($val->category->category_name); ?></td>
                      <td class="text-center"><a href="<?php echo route('backendProductFeatured', $val->id); ?>" class="btn btn-danger"><i class="fa fa-trash"></i></a></td>
								    </tr>
								  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
						    </tbody>
						  </table>
			    	</div>
					</div>

        </section>
      </div>
      <?php endif; ?>
      

      
      <div class="col-xs-12">
        <section id="message-home-content" class="panel panel-primary">
          <header class="panel-heading">
            <h2>
              <?php echo app('translator')->getFromJson('backend.introduction-content'); ?>
            </h2>
          </header>
          <?php echo Form::open(['url' => route('beHomeSaveContent'),'method'=>'post']); ?>

            <?php echo Form::hidden('id',isset($content->id)?$content->id:''); ?>

            <div class="panel-body">
              <?php if(Session::has('message-home-content')): ?>
                <div class="alert <?php echo e(Session::get('alert-class')); ?> alert-dismissible" role="alert">
                  <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                  <p><?php echo e(Session::get('message-home-content')); ?></p>
                </div>
              <?php endif; ?>

              <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                <?php 
                  if(count(config('translatable.locales')) > 1){
                    $lang_ext = $language;
                  }else{
                    $lang_ext = "";
                  }
                  $data = $content->locales()->where('locale',$lang)->first();
                  if(isset($data)){
                    $title = $data->general_title;
                    $text = $data->general_content;
                  }else{
                    $title = $content->general_title;
                    $text = $content->general_content;
                  }
                 ?>
                <div class="col-xs-12 col-sm-6 <?php echo e((count(config('translatable.locales')) == 1) ? 'col-sm-offset-3' : ''); ?>">
                  <div class="panel panel-info">
                  <div class="panel-heading text-center">
                    <h3><?php echo e($lang_ext); ?></h3>
                  </div>
                  <div class="panel-body">
                    <div class="form-group">
                      <?php echo Form::label('title',__('backend.title'),['class'=>'control-label']); ?>

                      <div class="<?php echo e($errors->has('title') ? ' has-error' : ''); ?>">
                        <?php echo Form::text('title['.$lang.']',$title,['class'=>'form-control']); ?>

                        <?php if($errors->has('title')): ?>
                            <span class="help-block">
                                <strong><?php echo e($errors->first('title')); ?></strong>
                            </span>
                        <?php endif; ?>
                      </div>
                    </div>
                    <div class="form-group">
                      <?php echo Form::label('text',__('backend.text'),['class'=>'control-label']); ?>

                      <div class="<?php echo e($errors->has('text') ? ' has-error' : ''); ?>">
                        <?php echo Form::textarea('text['.$lang.']',$text,['class'=>'form-control']); ?>

                        <?php if($errors->has('text')): ?>
                            <span class="help-block">
                                <strong><?php echo e($errors->first('text')); ?></strong>
                            </span>
                        <?php endif; ?>
                      </div>
                    </div>
                  </div>
                </div>
                </div>
              <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
            </div>
            <footer class="panel-footer text-center">
              <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('backend.update'); ?></button>
            </footer>
          <?php echo Form::close(); ?>

        </section>
      </div>
      

      
      <div class="col-xs-12">
        <section id="message-card" class="panel panel-primary">
          <header class="panel-heading">
            <h2>
              <?php echo app('translator')->getFromJson('backend.cards'); ?>
              <?php if(count($cards) < 3): ?>
              <button class="btn btn-success" data-toggle="modal" data-target="#addCard"><?php echo app('translator')->getFromJson('backend.add-card'); ?></button>
              <?php endif; ?>
              <button class="btn btn-warning" data-toggle="modal" data-target="#reorderCard"><?php echo app('translator')->getFromJson('backend.arrange-order'); ?></button>
            </h2>
          </header>
          <div class="panel-body">
            <?php if(Session::has('message-card')): ?>
              <div class="alert <?php echo e(Session::get('alert-class')); ?> alert-dismissible" role="alert">
                <button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <p><?php echo e(Session::get('message-card')); ?></p>
              </div>
            <?php endif; ?>
            <div class="table-responsive">
              <table id="cardTable" class="table table-hover">
                <thead>
                  <tr>
                    <th class="text-center">#</th>
                      <th class="text-center"><?php echo app('translator')->getFromJson('backend.image'); ?></th>
                      <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php if(count(config('translatable.locales')) > 1): ?>
                          <th class="text-center"><?php echo app('translator')->getFromJson('backend.caption'); ?> [<?php echo e($language); ?>]</th>
                        <?php else: ?>
                          <th class="text-center"><?php echo app('translator')->getFromJson('backend.caption'); ?></th>
                        <?php endif; ?>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <th class="text-center"><?php echo app('translator')->getFromJson('backend.options'); ?></th>
                  </tr>
                </thead>
                <tbody>
                  <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <tr>
                      <td class="text-center"><?php echo e($key+1); ?></td>
                      <td class="text-center">
                        <img class="img img-responsive" alt="image" src="<?php echo e(asset($storage_url.'img/home/'.$val->media_url)); ?>" style="max-height: 100px;margin: 0 auto">
                      </td>
                      <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php 
                          $caption = $val->locales()->where('locale',$lang)->first();
                         ?>
                        <td class="text-center">
                          <?php echo e(isset($caption->media_title) ? $caption->media_title : $val->media_title); ?>

                        </td>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                      <td class="text-center">
                        
                        <button title="Update Card" class="btn btn-warning" data-toggle="modal" data-target="#updatecard<?php echo e($val->id); ?>"><i class="fa fa-pencil" aria-hidden="true"></i></button>
                        
                        <button title="Delete Card" class="btn btn-danger" data-toggle="modal" data-target="#deletecard<?php echo e($val->id); ?>"><i class="fa fa-trash" aria-hidden="true"></i></button>
                        <div id="deletecard<?php echo e($val->id); ?>" class="modal fade" role="dialog">
                          <div class="modal-dialog modal-sm">

                            <?php echo Form::open(['url' => route('beHomeDeleteCard',['id'=>$val->id]),'method'=>'delete']); ?>

                              <?php echo Form::hidden('id',$val->id); ?>

                              <div class="modal-content text-center">
                                <div class="modal-body">
                                  <h3><?php echo app('translator')->getFromJson('backend.ask-delete-card'); ?></h3>
                                  <img class="img img-responsive" alt="image" src="<?php echo e(asset($storage_url.'img/home/'.$val->media_url)); ?>">
                                  <br>
                                  <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('backend.delete'); ?></button>
                                  <button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
                                </div>
                              </div>
                            <?php echo Form::close(); ?>


                          </div>
                        </div>
                      </td>
                    </tr>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </tbody>
              </table>
            </div>
          </div>
        </section>

        
        <?php if(count($cards) < 3): ?>
          <div id="addCard" class="modal fade" role="dialog">
            <div class="modal-dialog">

              <?php echo Form::open(['url' => route('beHomeSaveCard'),'method'=>'post','files'=>true, 'class' => 'image-form']); ?>

              <?php echo Form::hidden('image'); ?>


                <div class="modal-content">
                  <div class="modal-header">
                    <h2><?php echo app('translator')->getFromJson('backend.add-card'); ?></h2>
                  </div>
                  <div class="modal-body text-center">

                    
                    <div class="" style="width: 300px; margin: 0 auto 20px auto;">
                      <div class="image-cropper" data-height="500" data-width="500" data-exportZoom="1">
                        <div class="cropit-preview">
                          <div class="caption">
                            <p><?php echo app('translator')->getFromJson('backend.minimum-resolution'); ?> 500x500 px</p>
                          </div>
                        </div>

                        <div class="controls-wrapper">
                          <div class="rotation-btns">
                            <a class="rotate-ccw-btn"><i class="fa fa-undo"></i></a>
                            <a class="rotate-cw-btn"><i class="fa fa-repeat"></i></a>
                          </div>
                          <div class="slider-wrapper">
                            <i class="fa fa-picture-o" aria-hidden="true"></i>
                            <input type="range" class="cropit-image-zoom-input">
                            <i class="fa fa-picture-o fa-2x" aria-hidden="true"></i>
                          </div>
                        </div>

                        <label for="cropit-image-input" class="btn btn-primary btn-outlined"><?php echo app('translator')->getFromJson('backend.upload'); ?></label>
                        <input type="file" class="cropit-image-input" style="display:none"/>

                        <button title="<?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?>" type="button" class="btn btn-primary btn-outlined js-pixabay-trigger"><?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?></button>
                      </div>
                    </div>
                    



                    <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <div class="panel panel-info">
                        <div class="panel-heading">
                          <h3><?php echo e(count(config('translatable.locales')) > 1 ? $language : ""); ?></h3>
                        </div>
                        <div class="panel-body">
                          <div class="form-group">
                            <?php echo Form::label('imagealt',__('backend.seo'),['class'=>'control-label']); ?>

                            <div class="<?php echo e($errors->has('imagealt') ? ' has-error' : ''); ?>">
                              <?php echo Form::text('imagealt['.$lang.']','',['class'=>'form-control']); ?>

                              <?php if($errors->has('imagealt')): ?>
                                  <span class="help-block">
                                      <strong><?php echo e($errors->first('imagealt')); ?></strong>
                                  </span>
                              <?php endif; ?>
                            </div>
                          </div>
                          <div class="form-group">
                            <?php echo Form::label('cardtitle',__('backend.card-title'),['class'=>'control-label']); ?>

                            <div class="<?php echo e($errors->has('cardtitle') ? ' has-error' : ''); ?>">
                              <?php echo Form::text('cardtitle['.$lang.']','',['class'=>'form-control']); ?>

                              <?php if($errors->has('cardtitle')): ?>
                                  <span class="help-block">
                                      <strong><?php echo e($errors->first('cardtitle')); ?></strong>
                                  </span>
                              <?php endif; ?>
                            </div>
                          </div>
                          <div class="form-group">
                            <?php echo Form::label('cardcontent',__('backend.card-content'),['class'=>'control-label']); ?>

                            <div class="<?php echo e($errors->has('cardcontent') ? ' has-error' : ''); ?>">
                              <?php echo Form::textarea('cardcontent['.$lang.']','',['class'=>'form-control']); ?>

                              <?php if($errors->has('cardcontent')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('cardcontent')); ?></strong>
                                </span>
                              <?php endif; ?>
                            </div>
                          </div>
                        </div>
                      </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </div>
                  <footer class="modal-footer">
                    <button type="submit" class="btn btn-primary btn-image-submit"><?php echo app('translator')->getFromJson('backend.save'); ?></button>
                    <button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
                  </footer>
                </div>
              <?php echo Form::close(); ?>


            </div>
          </div>
        <?php endif; ?>

        
        <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $key => $val): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
          <div id="updatecard<?php echo e($val->id); ?>" class="modal fade" role="dialog">
            <div class="modal-dialog">

              <?php echo Form::open(['url' => route('beHomeSaveCard'),'method'=>'post','files'=>true, 'class' => 'image-form']); ?>

              <?php echo Form::hidden('card_id',$val->id); ?>

              <?php echo Form::hidden('image'); ?>


              <div class="modal-content">
                <div class="modal-header">
                  <h2><?php echo app('translator')->getFromJson('backend.update-card'); ?></h2>
                </div>
                <div class="modal-body text-center">

                    
                    <div class="" style="width: 300px; margin: 0 auto 20px auto;">
                      <div class="image-cropper" data-height="500" data-width="500" data-exportZoom="1" data-src="<?php echo e(asset($storage_url.'img/home/'.$val->media_url)); ?>">
                        <div class="cropit-preview">
                          <div class="caption">
                            <p><?php echo app('translator')->getFromJson('backend.minimum-resolution'); ?> 500x500 px</p>
                          </div>
                        </div>

                        <div class="controls-wrapper">
                          <div class="rotation-btns">
                            <a class="rotate-ccw-btn"><i class="fa fa-undo"></i></a>
                            <a class="rotate-cw-btn"><i class="fa fa-repeat"></i></a>
                          </div>
                          <div class="slider-wrapper">
                            <i class="fa fa-picture-o" aria-hidden="true"></i>
                            <input type="range" class="cropit-image-zoom-input">
                            <i class="fa fa-picture-o fa-2x" aria-hidden="true"></i>
                          </div>
                        </div>

                        <label for="cropit-image-input" class="btn btn-primary btn-outlined"><?php echo app('translator')->getFromJson('backend.upload'); ?></label>
                        <input type="file" class="cropit-image-input" style="display:none"/>

                        <button title="<?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?>" type="button" class="btn btn-primary btn-outlined js-pixabay-trigger"><?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?></button>
                      </div>
                    </div>
                    

                  <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <?php 
                      $data = $val->locales()->where('locale',$lang)->first();
                      if(!empty($data)){
                        $alt = $data->media_desc;
                        $title = $data->media_title;
                        $text = $data->media_content;
                      }else{
                        $alt = $val->media_desc;
                        $title = $val->media_title;
                        $text = $val->media_content;
                      }
                     ?>
                    <div class="panel panel-info">
                      <div class="panel-heading">
                        <h3><?php echo e(count(config('translatable.locales')) > 1 ? $language : ""); ?></h3>
                      </div>
                      <div class="panel-body">
                        <div class="form-group">
                          <?php echo Form::label('imagealt',__('backend.seo'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('imagealt') ? ' has-error' : ''); ?>">
                            <?php echo Form::text('imagealt['.$lang.']',isset($alt)?$alt:"",['class'=>'form-control']); ?>

                            <?php if($errors->has('imagealt')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('imagealt')); ?></strong>
                                </span>
                            <?php endif; ?>
                          </div>
                        </div>
                        <div class="form-group">
                          <?php echo Form::label('cardtitle',__('backend.card-title'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('cardtitle') ? ' has-error' : ''); ?>">
                            <?php echo Form::text('cardtitle['.$lang.']',isset($title)?$title:"",['class'=>'form-control']); ?>

                            <?php if($errors->has('cardtitle')): ?>
                                <span class="help-block">
                                    <strong><?php echo e($errors->first('cardtitle')); ?></strong>
                                </span>
                            <?php endif; ?>
                          </div>
                        </div>
                        <div class="form-group">
                          <?php echo Form::label('cardcontent',__('backend.card-content'),['class'=>'control-label']); ?>

                          <div class="<?php echo e($errors->has('cardcontent') ? ' has-error' : ''); ?>">
                            <?php echo Form::textarea('cardcontent['.$lang.']',isset($text)?$text:"",['class'=>'form-control']); ?>

                            <?php if($errors->has('cardcontent')): ?>
                              <span class="help-block">
                                  <strong><?php echo e($errors->first('cardcontent')); ?></strong>
                              </span>
                            <?php endif; ?>
                          </div>
                        </div>
                      </div>
                    </div>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                </div>
                <footer class="modal-footer">
                  <button type="submit" class="btn btn-primary btn-image-submit"><?php echo app('translator')->getFromJson('backend.save'); ?></button>
                  <button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
                </footer>
              </div>
              <?php echo Form::close(); ?>


            </div>
          </div>
        <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

        
        <div id="reorderCard" class="modal fade" role="dialog">
          <div class="modal-dialog">

            <?php echo Form::open(['url' => route('beHomeOrderCard'),'method'=>'post']); ?>

              <div class="modal-content">
                <div class="modal-header">
                  <h2><?php echo app('translator')->getFromJson('backend.rearrange-order'); ?></h2>
                </div>
                <div class="modal-body">
                  <ul class="sortable media-list">
                    <?php $__currentLoopData = $cards; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $x => $vals): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <?php 
                          $get = $vals->locales()->where('locale',config('app.locale'))->first();
                         ?>
                      <li class="media">
                        <?php echo Form::hidden('reorder[]',$vals->id); ?>

                        <div class="media-left">
                          <a href="#">
                            <img class="media-object" src="<?php echo e(asset($storage_url.'img/home/'.$vals->media_url)); ?>" alt="" height="64px">
                          </a>
                        </div>
                        <div class="media-body">
                          <h4 class="media-heading">( <?php echo e($vals->temp_id); ?> )<?php echo e(isset($get->media_title) ? $get->media_title : $vals->media_title); ?></h4>
                          <?php echo isset($get->media_content) ? $get->media_content : $vals->media_content; ?>

                        </div>
                      </li>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                  </ul>
                </div>
                <footer class="modal-footer">
                  <button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('backend.save'); ?></button>
                  <button class="btn btn-default" data-dismiss="modal"><?php echo app('translator')->getFromJson('backend.cancel'); ?></button>
                </footer>
              </div>
            <?php echo Form::close(); ?>


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

      
      <div class="col-xs-12">
  			<section id="message-divider" class="panel panel-primary">
					<header class="panel-heading">
						<h2>
							<?php echo app('translator')->getFromJson('backend.divider'); ?>
						</h2>
					</header>
					<?php echo Form::open(['url' => route('beHomeSaveDivider'),'method'=>'post']); ?>

					<div class="panel-body">
						<?php if(Session::has('message-divider')): ?>
							<div class="alert <?php echo e(Session::get('alert-class')); ?> alert-dismissible" role="alert">
								<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
							 	<p><?php echo e(Session::get('message-divider')); ?></p>
							</div>
						<?php endif; ?>

            <?php echo Form::hidden('id1',$divider1->id); ?>

            <?php echo Form::hidden('id2', $divider2->id); ?>


            <div class="col-xs-12">
              <div class="panel panel-info">

                <div class="panel-heading">
                  <h3><?php echo app('translator')->getFromJson('backend.divider'); ?> 1</h3>
                </div>

                <div class="panel-body">

                  <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="form-group col-xs-12 col-sm-6">
                      <label for="caption" class="control-label"><?php echo app('translator')->getFromJson('backend.caption'); ?> [<?php echo e($lang); ?>]</label>
                      <div class="<?php echo e($errors->has('divider1') ? ' has-error' : ''); ?>">

                        <input type="text" name="divider1[<?php echo e($lang); ?>]" class="form-control"
                          value="<?php echo e($divider1->hasTranslation($lang) && $divider1->general_content ? $divider1->translate($lang)->general_content : ''); ?>">
                        <?php if($errors->has('divider1')): ?>
                          <span class="help-block">
                            <strong><?php echo e($errors->first('divider1')); ?></strong>
                          </span>
                        <?php endif; ?>
                      </div>
                    </div>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                  <div class="form-group col-xs-12 col-sm-12">
                    <label for="target" class="control-label"><?php echo app('translator')->getFromJson('backend.target'); ?></label>
                    <select name="select_divider1" class="selectpicker form-control">
                      <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($page->key); ?>" <?php echo e($page->key==$divider1->general_url ? 'selected' : ''); ?>>
                          <?php echo e($page->page_name); ?>

                        </option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>

                </div>

              </div>
            </div>

            <div class="col-xs-12">
              <div class="panel panel-info">

                <div class="panel-heading">
                  <h3><?php echo app('translator')->getFromJson('backend.divider'); ?> 2</h3>
                </div>

                <div class="panel-body">

                  <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                    <div class="form-group col-xs-12 col-sm-6">
                      <label for="caption" class="control-label"><?php echo app('translator')->getFromJson('backend.caption'); ?> [<?php echo e($lang); ?>]</label>
                      <div class="<?php echo e($errors->has('divider2') ? ' has-error' : ''); ?>">

                        <input type="text" name="divider2[<?php echo e($lang); ?>]" class="form-control"
                          value="<?php echo e($divider2->hasTranslation($lang) && $divider2->general_content ? $divider2->translate($lang)->general_content : ''); ?>">
                        <?php if($errors->has('divider2')): ?>
                          <span class="help-block">
                            <strong><?php echo e($errors->first('divider2')); ?></strong>
                          </span>
                        <?php endif; ?>
                      </div>
                    </div>
                  <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>

                  <div class="form-group col-xs-12 col-sm-12">
                    <label for="target" class="control-label"><?php echo app('translator')->getFromJson('backend.target'); ?></label>
                    <select name="select_divider2" class="selectpicker form-control">
                      <?php $__currentLoopData = $pages; $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $page): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                        <option value="<?php echo e($page->key); ?>" <?php echo e($page->key==$divider2->general_url ? 'selected' : ''); ?>>
                          <?php echo e($page->page_name); ?>

                        </option>
                      <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
                    </select>
                  </div>

                </div>

              </div>
            </div>

					</div>
					<footer class="panel-footer text-center">
						<button type="submit" class="btn btn-primary"><?php echo app('translator')->getFromJson('backend.update'); ?></button>
					</footer>
					<?php echo Form::close(); ?>

	    	</section>
  		</div>
      

      
  		<div class="col-xs-12">
  			<section class="panel panel-primary">
					<header class="panel-heading">
						<h2>
							<?php echo app('translator')->getFromJson('backend.banner'); ?>
						</h2>
					</header>

					<div class="panel-body">
						<?php echo Form::open(['url' => route('beHomeSaveBanner'),'method'=>'post','files'=>true, 'class' => 'image-form']); ?>

							<?php echo Form::hidden('bannerid',$banner1->id); ?>

							<?php echo Form::hidden('bannertype','banner1'); ?>

              <?php echo Form::hidden('image'); ?>


							<div id="message-banner1" class="panel panel-primary">
								<div class="panel-heading">
									<h3><?php echo app('translator')->getFromJson('backend.banner'); ?> 1</h3>
								</div>
								<div class="panel-body">
									<?php if(Session::has('message-banner1')): ?>
										<div class="alert <?php echo e(Session::get('alert-class')); ?> alert-dismissible" role="alert">
											<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
										 	<p><?php echo e(Session::get('message-banner1')); ?></p>
										</div>
									<?php endif; ?>

									
                  <div class="" style="width: 800px; margin: 0 auto 20px auto;">
                    <div class="image-cropper" data-height="275" data-width="800" data-exportZoom="2" data-src="<?php echo e(asset($storage_url.'img/home/'.$banner1->media_url)); ?>">
                      <div class="cropit-preview">
                        <div class="caption">
                          <p><?php echo app('translator')->getFromJson('backend.minimum-resolution'); ?> 1600x550 px</p>
                        </div>
                      </div>

                      <div class="controls-wrapper">
                        <div class="rotation-btns">
                          <a class="rotate-ccw-btn"><i class="fa fa-undo"></i></a>
                          <a class="rotate-cw-btn"><i class="fa fa-repeat"></i></a>
                        </div>
                        <div class="slider-wrapper">
                          <i class="fa fa-picture-o" aria-hidden="true"></i>
                          <input type="range" class="cropit-image-zoom-input">
                          <i class="fa fa-picture-o fa-2x" aria-hidden="true"></i>
                        </div>
                      </div>

                      <label for="cropit-image-input" class="btn btn-primary btn-outlined"><?php echo app('translator')->getFromJson('backend.upload'); ?></label>
                      <input type="file" class="cropit-image-input" style="display:none"/>

                      <button title="<?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?>" type="button" class="btn btn-primary btn-outlined js-pixabay-trigger"><?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?></button>
                    </div>
                  </div>
                  

									<div class="col-xs-12">
                    <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <?php 
                        if(count(config('translatable.locales')) > 1){
                          $lang_ext = $language;
                        }else{
                          $lang_ext = "";
                        }

                        $get = $banner1->locales()->where('locale',$lang)->first();
                        if(!empty($get)){
                          $title = $get->media_title;
                          $text = $get->media_content;
                          $alt = $get->media_desc;
                        }else{
                          $title = $banner1->media_title;
                          $text = $banner1->media_content;
                          $alt = $banner1->media_desc;
                        }
                       ?>
                      <div class="col-xs-12 col-sm-6 <?php echo e(count(config('translatable.locales')) == 1 ? 'col-sm-offset-3' : ''); ?>">
                        <div class="panel panel-info">
                          <div class="panel-heading">
                            <h3><?php echo e($lang_ext); ?></h3>
                          </div>
                          <div class="panel-body">
                            <div class="form-group">
                              <?php echo Form::label('imagealt1',__('backend.seo'),['class'=>'control-label']); ?>

                              <div class="<?php echo e($errors->has('imagealt1') ? ' has-error' : ''); ?>">
                                <?php echo Form::text('imagealt1['.$lang.']',isset($alt)?$alt:"",['class'=>'form-control']); ?>

                                <?php if($errors->has('imagealt1')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('imagealt1')); ?></strong>
                                    </span>
                                <?php endif; ?>
                              </div>
                            </div>
                            <div class="form-group">
        											<?php echo Form::label('title_banner1',__('backend.title-banner').' 1',['class'=>'control-label']); ?>

        											<div class="<?php echo e($errors->has('title_banner1') ? ' has-error' : ''); ?>">
        												<?php echo Form::text('title_banner1['.$lang.']',$title,['class'=>'form-control']); ?>

        												<?php if($errors->has('title_banner1')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('title_banner1')); ?></strong>
                                    </span>
                                <?php endif; ?>
        											</div>
        										</div>
        										<div class="form-group">
        											<?php echo Form::label('content_banner1',__('backend.content-banner').' 1',['class'=>'control-label']); ?>

        											<div class="<?php echo e($errors->has('content_banner1') ? ' has-error' : ''); ?>">
        												<?php echo Form::textarea('content_banner1['.$lang.']',$text,['class'=>'form-control']); ?>

        												<?php if($errors->has('content_banner1')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('content_banner1')); ?></strong>
                                    </span>
                                <?php endif; ?>
        											</div>
        										</div>
                          </div>
                        </div>
                      </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
									</div>
								</div>
								<footer class="panel-footer text-center">
									<button type="submit" class="btn btn-primary btn-image-submit"><?php echo app('translator')->getFromJson('backend.update'); ?></button>
								</footer>
							</div>
						<?php echo Form::close(); ?>


						<?php echo Form::open(['url' => route('beHomeSaveBanner'),'method'=>'post','files'=>true, 'class' => 'image-form']); ?>

							<?php echo Form::hidden('bannerid',$banner2->id); ?>

							<?php echo Form::hidden('bannertype','banner2'); ?>

              <?php echo Form::hidden('image'); ?>


              <div id="message-banner2" class="panel panel-primary">
								<div class="panel-heading">
									<h3><?php echo app('translator')->getFromJson('backend.banner'); ?> 2</h3>
								</div>
								<div class="panel-body">
									<?php if(Session::has('message-banner2')): ?>
										<div class="alert <?php echo e(Session::get('alert-class')); ?> alert-dismissible" role="alert">
											<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
										 	<p><?php echo e(Session::get('message-banner2')); ?></p>
										</div>
									<?php endif; ?>

									
                  <div class="" style="width: 800px; margin: 0 auto 20px auto;">
                    <div class="image-cropper" data-height="275" data-width="800" data-exportZoom="2" data-src="<?php echo e(asset($storage_url.'img/home/'.$banner2->media_url)); ?>">
                      <div class="cropit-preview">
                        <div class="caption">
                          <p><?php echo app('translator')->getFromJson('backend.minimum-resolution'); ?> 1600x550 px</p>
                        </div>
                      </div>

                      <div class="controls-wrapper">
                        <div class="rotation-btns">
                          <a class="rotate-ccw-btn"><i class="fa fa-undo"></i></a>
                          <a class="rotate-cw-btn"><i class="fa fa-repeat"></i></a>
                        </div>
                        <div class="slider-wrapper">
                          <i class="fa fa-picture-o" aria-hidden="true"></i>
                          <input type="range" class="cropit-image-zoom-input">
                          <i class="fa fa-picture-o fa-2x" aria-hidden="true"></i>
                        </div>
                      </div>

                      <label for="cropit-image-input" class="btn btn-primary btn-outlined"><?php echo app('translator')->getFromJson('backend.upload'); ?></label>
                      <input type="file" class="cropit-image-input" style="display:none"/>

                      <button title="<?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?>" type="button" class="btn btn-primary btn-outlined js-pixabay-trigger"><?php echo app('translator')->getFromJson('backend.search-on-pixabay'); ?></button>
                    </div>
                  </div>
                  

									<div class="col-xs-12">
                    <?php $__currentLoopData = config('translatable.locales'); $__env->addLoop($__currentLoopData); foreach($__currentLoopData as $lang => $language): $__env->incrementLoopIndices(); $loop = $__env->getLastLoop(); ?>
                      <?php 
                        if(count(config('translatable.locales')) > 1){
                          $lang_ext = $language;
                        }else{
                          $lang_ext = "";
                        }

                        $get = $banner2->locales()->where('locale',$lang)->first();
                        if(!empty($get)){
                          $title = $get->media_title;
                          $text = $get->media_content;
                          $alt = $get->media_desc;
                        }else{
                          $title = $banner2->media_title;
                          $text = $banner2->media_content;
                          $alt = $banner2->media_desc;
                        }
                       ?>
                      <div class="col-xs-12 col-sm-6 <?php echo e(count(config('translatable.locales')) == 1 ? 'col-sm-offset-3' : ''); ?>">
                        <div class="panel panel-info">
                          <div class="panel-heading">
                            <h3><?php echo e($lang_ext); ?></h3>
                          </div>
                          <div class="panel-body">
                            <div class="form-group">
                              <?php echo Form::label('imagealt2',__('backend.seo'),['class'=>'control-label']); ?>

                              <div class="<?php echo e($errors->has('imagealt2') ? ' has-error' : ''); ?>">
                                <?php echo Form::text('imagealt2['.$lang.']',isset($alt)?$alt:"",['class'=>'form-control']); ?>

                                <?php if($errors->has('imagealt2')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('imagealt2')); ?></strong>
                                    </span>
                                <?php endif; ?>
                              </div>
                            </div>
                            <div class="form-group">
        											<?php echo Form::label('title_banner2',__('backend.title-banner').' 2',['class'=>'control-label']); ?>

        											<div class="<?php echo e($errors->has('title_banner2') ? ' has-error' : ''); ?>">
        												<?php echo Form::text('title_banner2['.$lang.']',$title,['class'=>'form-control']); ?>

        												<?php if($errors->has('title_banner2')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('title_banner2')); ?></strong>
                                    </span>
                                <?php endif; ?>
        											</div>
        										</div>
        										<div class="form-group">
        											<?php echo Form::label('content_banner2',__('backend.content-banner').' 2',['class'=>'control-label']); ?>

        											<div class="<?php echo e($errors->has('content_banner2') ? ' has-error' : ''); ?>">
        												<?php echo Form::textarea('content_banner2['.$lang.']',$text,['class'=>'form-control']); ?>

        												<?php if($errors->has('content_banner2')): ?>
                                    <span class="help-block">
                                        <strong><?php echo e($errors->first('content_banner2')); ?></strong>
                                    </span>
                                <?php endif; ?>
        											</div>
        										</div>
                          </div>
                        </div>
                      </div>
                    <?php endforeach; $__env->popLoop(); $loop = $__env->getLastLoop(); ?>
									</div>
								</div>
								<footer class="panel-footer text-center">
									<button type="submit" class="btn btn-primary btn-image-submit"><?php echo app('translator')->getFromJson('backend.update'); ?></button>
								</footer>
							</div>
						<?php echo Form::close(); ?>

					</div>

	    	</section>
  		</div>
      

      <div class="col-xs-12">
        <?php echo $__env->make('backend.home_components.instagram', array_except(get_defined_vars(), array('__data', '__path')))->render(); ?>
      </div>
    </div>
  </div>
<?php $__env->stopSection(); ?>

<?php $__env->startSection('script'); ?>
<script type="text/javascript">
	$("#carouselTable").DataTable();
  $("#cardTable").DataTable();
  $("#featuredTable").DataTable();

  <?php if($errors->has('imagefile')): ?>
    $("#addCarousel").modal('show');
  <?php endif; ?>

  <?php if($errors->has('imagefilecard')): ?>
    $("#addCard").modal('show');
  <?php endif; ?>

  $(".image-select").chosen();
  $(".sortable").sortable();
</script>
<?php $__env->stopSection(); ?>

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