@extends('template.room')

@section('content')

<!-- BEGIN .section -->
<div class="section accommodation-page page-full clearfix">

	<h2 class="page-title page-title-full">Phòng nghỉ</h2>
	
	<hr>					
	<!-- BEGIN .section -->
	<div class="section clearfix">
		@foreach($rooms as $room)
		<?php $arr = explode(';', $room -> image) ; ?>
		<div class="one-third-full">
			<p><div class="block-img1"><a href="{{Asset('home/room-detail')}}/{{$room->id}}"><img src="{{$arr[0]}}" width="278" height="173" alt="" /></a></div></p>
			<h3 class="title1"><a href="{{Asset('home/room-detail')}}/{{$room->id}}">{{$room -> name}}</a><span class="title-end"></span></h3>		
			<p>{{substr($room -> description, 0, 112)}}</p>
			<p><a href="{{Asset('home/room-detail')}}/{{$room->id}}" class="button2">Xem thêm &raquo;</a></p>
		</div>
		@endforeach
	<!-- END .section -->
	</div>
	
	<div class="page-pagination page-pagination-full">
		<p class="clearfix">
			<span class="fl"><a href="{{$rooms->previousPageUrl()}}">&larr; Previous</a></span>
			<span class="fr"><a href="{{$rooms->nextPageUrl()}}">Next &rarr;</a></span>
		</p>
	</div>

<!-- END .section -->
</div>
@stop