@extends('layouts.layout')

@section('content')




<div class="form-group row add">
	<div class="col-md-6" style="margin-left: 450px;">
		{!! Form::open(['method'=>'GET','url'=>'pembayaran','class'=>'navbar-form navbar-left','role'=>'search']) !!}
		<div class="input-group custom-search-form">
			<input type="text" name="search" class="form-control" placeholder="Search........" style="color: black; margin-left: 260px; height: 40px">	
			<span class="input-group-btn">
				<button type="submit" class="btn btn-default-sm" style="margin-left: 265px">
					<i class="fa fa-search"></i>
				</button>
			</span>
		</div>
		{!! Form::close() !!}
		</div>
		</div>


	<div class="row" style="margin-top: -1000px">
	<div class="col-md-12">
	<h2 style="color:black">Daftar pembayaran</h2>
	</div>
	</div>

<div class="panel-body">
<a href="{{URL::to('deleteAllPembayaran')}}" class="btn btn-danger">Delete All</a>
<a href="{{URL::to('getImportPembayaran')}}" class="btn btn-success">Import</a>
<div class="btn-group">
	<button type="button" class="btn btn-info">Export</button>
	<button type="button" class="btn btn-info dropdown-toggle" data-toggle="dropdown">
	<span class="caret"></span>
	<span class="sr-only">Toggle Dropdown</span>
	</button>
	<ul class="dropdown-menu" role="menu" id="export-men">
	<li id="export-to-excel"><a href="{{URL::to('getExportPembayaran')}}">Export To Excel</a></li>
	<li id="export-to-pdf"><a href="{{URL::to('getPDFPembayaran')}}">Export To PDF</a></li>
	<li class="divider"></li>

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


	<div class="row">
		<table class="table table-striped" style="color:black">
		<tr>
		<th>No.</th>
		<th>Nama</th>
		<th>Kontak</th>
		<th>Check In</th>
		<th>Check Out</th>
		<th>Actions</th>
		</tr>

		<a href="{{route('pembayaran.create')}}" style="margin-top: -50px"><i class=" btn btn-info fa fa-plus pull-left" style="width: 150px; margin-left: 30px; "> Data Pembayaran</i></a><br>  	
		
		
     	
		<?php $no=1; ?>

		@foreach($pembayarans as $pembayaran)

		<tr style="background-color: #E1E1E1">
		<td>{{$no++}}</td>
		<td>{{$pembayaran->nama}}</td>
		<td>{{$pembayaran->kontak}}</td>
		<td>{{$pembayaran->check_in}}</td>
		<td>{{$pembayaran->check_out}}</td>
		<td>
		<form class="" action="{{route('pembayaran.destroy', $pembayaran->id)}}" method="post">
		<input type="hidden" name="_method" value="delete">
		<input type="hidden" name="_token" value="{{ csrf_token() }}">
		<a href="{{route('pembayaran.edit',$pembayaran->id)}}" class="btn btn-primary"><i class="ti-pencil-alt"> Edit</i></a>
		
		<a href="{{url('/tampilkandata', $pembayaran->id)}}" class="btn btn-success"><i class="ti-eye"> View</i></a>
		<a href="{{url('/pdf', $pembayaran->id)}}" class="btn btn-warning"><i class="ti-printer"> Print</i></a>

		<input type="hidden" name="_method" value="delete">
		<button type="submit" class="btn btn-danger" onclick="return confirm('Apakah anda yakin untuk menghapus data ini ?');"><i class="fa fa-trash" style="width:50px;"> Delete</i>

		</form>
		</td>

		</tr>

		@endforeach

		</table>
{!! $pembayarans->links() !!}
		
		</div>



  @endsection