@extends('master')
	@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........">
			<span class="input-group-btn">
				<button type="submit" class="btn btn-default-sm">
					<i class="fa fa-search">search</i>
				</button>
			</span>
		</div>
		{!! Form::close() !!}
		</div>
		</div>


	<div class="row">
	<div class="col-md-12">
	<h2>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">
		<tr>
		<th>No.</th>
		<th>Nama</th>
		<th>Jenis kamar</th>
		<th>Lama Menginap</th>
		<th>Actions</th>
		</tr>

		<a href="{{route('pembayaran.create')}}" class="btn btn-info pull-right">Create New Pembayaran</a><br>
		
		
     	<a href="{{route('receptionist')}}"><button type="button" class="btn btn-lg"><i class="glyphicon glyphicon-hand-left"></i></button></a><br>
		<?php $no=1; ?>

		@foreach($pembayarans as $pembayaran)

		<tr>
		<td>{{$no++}}</td>
		<td>{{$pembayaran->nama}}</td>
		<td>{{$pembayaran->jenis_kamar}}</td>
		<td>{{$pembayaran->lama}}</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">Edit</a>
		
		
		

		<input type="submit" class="btn btn-danger" onclick="return confirm('Are you sure to delete this data');" name="name" value="delete">
		</form>
		</td>

		</tr>

		@endforeach

		</table>
		</div>



	@stop