Commit 58e98932 by Juliper

no message

parent 68ed2296
......@@ -262,10 +262,13 @@ class OwnerController extends Controller
$dataHomestay = DB::table('homestay')
->join('pemilikhomestay','homestay.id_pemilik','pemilikhomestay.id')
->select('homestay.id')
->select('homestay.id','homestay.jumlah_kamar')
->where('homestay.id_pemilik','=',$dataPemilik[0]->id)
->get();
if($dataHomestay[0]->jumlah_kamar < $request['jumlah_kamar']){
return redirect('AddBook')->with('message','Maaf jumlah kamar tidak mencukupi');
}else{
$lb->homestay = $dataHomestay[0]->id;
$lb->nama_pemesan = $request['nama'];
$lb->jumlah_kamar = $request['jumlah_kamar'];
......@@ -278,7 +281,7 @@ class OwnerController extends Controller
$lb->save();
return redirect('daftarBooking');
}
}
//Melakukan Update Kamar
......
......@@ -11,8 +11,9 @@
<th> Total Pembayaran </th>
<th> Bukti Pembayaran </th>
<th> Status Pemesanan</th>
<th> Unggah Pembayaran </th>
<th> Bataklan Pesanan </th>
<th></th>
<th></th>
<th></th>
</tr>
</thead>
<tbody>
......@@ -41,15 +42,21 @@
{{csrf_field()}}
</form>
</td>
<td>
<form action="" method="post">
<input type="hidden" name="_method" value="PUT">
{{csrf_field()}}
<input type="submit" value="Perbaharui">
</form>
</td>
@elseif($a->status==1)
<td colspan="3"><h3>Di Terima</h3></td>
<td colspan="3"><h4>Di Terima</h4></td>
@elseif($a->status==2)
<td colspan="3"><h3>Di Tolak</h3></td>
<td colspan="3"><h4>Di Tolak</h4></td>
@elseif($a->status=3)
<td colspan="3"><h3>Telah Dibatalkan</h3></td>
<td colspan="3"><h4>Telah Dibatalkan</h4></td>
@endif
</td>
</tr>
@endforeach
</tbody>
......
......@@ -18,6 +18,11 @@
</ul>
</div>
@endif
@if(session()->has('message'))
<div class="alert alert-info">
{{session()->get('message')}}
</div>
@endif
</div>
<div class="box-body">
<form action="{{url('addManual')}}" method="post">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment