@extends('layouts.layout')

@section('content')
	<div class="row">
	<div class="col-md-12">
	<h2 style="color:black">Daftar Kamar</h2>
	</div>
	</div>





	<div class="row" >
		<table class="table table-striped" style="color:black">
		<tr>
		<th>No.</th>
		<th>Jenis Kamar</th>
		<th>Harga</th>
		<th>Jumlah Kamar</th>
		<th>Actions</th>
		</tr>

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

		@foreach($kamars as $kamar)

		<tr style="background-color: #E1E1E1">
		<td>{{$no++}}</td>
		<td>{{$kamar->jenis_kamar}}</td>
		<td>{{$kamar->harga_kamar}}</td>
		<td>{{$kamar->jumlah_kamar}}</td>
		<td>
		<form class="" action="{{route('kamar.destroy', $kamar->id)}}" method="post">
		<input type="hidden" name="_method" value="delete">
		<input type="hidden" name="_token" value="{{ csrf_token() }}">
		<a href="{{route('kamar.edit',$kamar->id)}}" class="btn btn-primary"><i class="ti-pencil-alt"> Edit</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>
		</div>



	
	@endsection