@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')}}" class="btn btn-info pull-right">Create New kamar</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"></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>
		</div>



	
	@endsection