@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: 280px">	
			<span class="input-group-btn">
				<button type="submit" class="btn btn-default-sm" style="margin-left: 250px">
					<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')}}" class="btn btn-info pull-right" style="margin-top: -50px">Create New Pembayaran</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"></i></a>
		
		<a href="{{url('/tampilkandata', $pembayaran->id)}}" class="btn btn-success"><i class="ti-eye"></i></a>
		<a href="{{url('/pdf', $pembayaran->id)}}" class="btn btn-warning"><i class="ti-printer"></i></a>

		<input type="hidden" name="_method" value="delete">
		<button type="submit" class="btn btn-danger"><i class="ti-close"></i>

		</form>
		</td>

		</tr>

		@endforeach

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



  @endsection