Commit db4d4ee4 by Juliper

controller again

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