 <div class="col-md-6">
  <h4 class="m-t-0 header-title"><b>Update Periods</b></h4>
  <hr>
  <form role="form" class="form-horizontal" action="<?php echo e(url('budgets/periods/period_update/'.$id)); ?>" method="post">
    <input type="hidden" name="_token" value="<?php echo csrf_token(); ?>">
    <input type="hidden" value="<?php echo e(Auth::user()->company_id); ?>" name="company_id" />
    <div class="form-group">
     <!-- <label class="control-label col-sm-2">Range</label> -->
      <div class="col-sm-7">
        <div class="input-daterange input-group" id="date-range">
		<?php if(count($periods_data)>0): ?>
        <?php foreach($periods_data as $row): ?>
	     <?php if($row->id==$id): ?>
          <input type="text" class="form-control" name="from" id="from"  placeholder="Start Date" value="<?php echo $row->from;?>"  >
          <span style="background-color: #51595e; color: white;" class="input-group-addon bg-custom b-0 text-white">to</span>
          <input type="text" class="form-control" name="to" id="to"  placeholder="End Date" value="<?php echo $row->to;?>"  >
          <?php endif; ?>
		<?php endforeach; ?>
        <?php endif; ?>
		
		</div>
      </div>
	  
	  <div class="col-sm-3">
	  <?php if(count($periods_data)>0): ?>
        <?php foreach($periods_data as $row): ?>
	     <?php if($row->id==$id): ?>
          <input type="text" class="form-control" name="name"  placeholder="Period Name" value="<?php echo $row->name;?>" style="border-radius:4px;" />
                <?php endif; ?>
		<?php endforeach; ?>
        <?php endif; ?>
	  </div>
	  
      <button class="btn btn-success waves-effect waves-light" type="submit">Update</button>
    </div>
  </form>
</div>