Commit db4d4ee4 by Juliper

controller again

parent c195b22e
......@@ -21,7 +21,8 @@ class OwnerController extends Controller
}
public function addBook(Request $request){
public function addBookManual(Request $request){
$lb = new ListBook();
$dataPemilik = DB::table('pemilikhomestay')
......@@ -32,9 +33,9 @@ class OwnerController extends Controller
$dataHomestay = DB::table('homestay')
->join('pemilikhomestay','homestay.idPemilik','pemilikhomestay.id')
->select('homestay.id')
->where('homestay.id_Akun','=',$dataPemilik[0]->id)
->where('homestay.idPemilik','=',$dataPemilik[0]->id)
->get();
dd($dataHomestay);
$lb->homestay;
$lb->nama_pemesan;
$lb->jumlah_kamar;
......
......@@ -20,10 +20,8 @@
@endif
</div>
<div class="box-body">
<form action="" method="post" enctype="multipart/form-data">
<input type="hidden" name="_method" value="PUT">
<!-- {{csrf_field()}} -->
<form action="{{url('addManual')}}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group">
<label> Nama Pemesan </label>
<div class="input-group">
......@@ -40,7 +38,7 @@
<div class="input-group-addon">
<i class="fa fa-user"></i>
</div>
<input type="text" name="kamar" value="" id="kamar" class="form-control">
<input type="text" name="jumlah_kamar" value="" id="kamar" class="form-control">
</div>
</div>
......@@ -62,7 +60,7 @@
<div class="input-group-addon">
<i class="fa fa-user"></i>
</div>
<input type="text" name="nama" value="" id="nama" class="form-control">
<input type="text" name="lama_menginap" value="" id="nama" class="form-control">
</div>
</div>
......
......@@ -57,6 +57,7 @@ Route::get('DataPemesanan', function(){
Route::get('listPemesanan','AdminController@listPesanan');
Route::put('editRoom/{id}','OwnerController@updateRoom');
Route::post('addManual','OwnerController@addBookManual');
Route::get('editRoom/{id}','OwnerController@editRoom') ;
Route::get('daftarKamar','OwnerController@daftarKamar');
......
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