Commit ee014bec by Juliper

transaction will done in time

parent fe9c68c1
......@@ -18,6 +18,12 @@ use Psy\Command\ListCommand\ConstantEnumerator;
class CustomerController extends Controller
{
public function hitory($id){
return view('adminlte::layouts.customers.History');
}
public function profile(){
//dd("masuk agan");
//dd(Auth::user()->id);
......@@ -148,14 +154,17 @@ class CustomerController extends Controller
$lb->homestay = $request['id'];
$lb->nama_pemesan = $data2[0]->nama;
$lb->tanggal_mulai =$request['tanggal'] ;
$lb->tanggal_mulai = $request['tanggal'] ;
$lb->tanggal_berakhir = $baru;
$trans->save();
$lb->save();
return redirect('detailhomestay/',$request['id']);
return redirect()->action(
'CustomerController@detailhomestay', ['id' => $request['id']]
);
}
}
......@@ -9,7 +9,7 @@ class ListBook extends Model
protected $table = "daftar_book";
protected $fillable = [
'nama_pemesan','tanggal_mulai','tanggal_berakhir'
'nama_pemesan','tanggal_mulai','tanggal_berakhir','homestay'
];
public $timestamps = false;
......
......@@ -40,32 +40,32 @@
<br><br>
<div class="details agilets w3layouts">
<h2 style="margin-bottom: 10px;"> Daftar Booking </h2>
<div class="container">
<div class="cuisines agileits w3layouts">
<div class="container">
<table class="table table-striped">
<thead>
<tr>
<th> Nama Pemesan </th>
<th> Tanggal Mulai </th>
<th> Tanggal Berakhir </th>
</tr>
</thead>
<tbody>
@foreach($daftarBook as $a)
<tr>
<td>{{$a->nama_pemesan}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
<h2 style="margin-bottom: 10px;"> Daftar Booking </h2>
<div class="container">
<div class="cuisines agileits w3layouts">
<div class="container">
<table class="table table-striped">
<thead>
<tr>
<th> Nama Pemesan </th>
<th> Tanggal Mulai </th>
<th> Tanggal Berakhir </th>
</tr>
</thead>
<tbody>
@foreach($daftarBook as $a)
<tr>
<td>{{$a->nama_pemesan}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
</tr>
@endforeach
</tbody>
</table>
</div>
</div>
</div>
</div>
<!-- Informations -->
......
......@@ -81,11 +81,11 @@
<script src="{{asset('js/jquery-ui.js')}}"></script>
<script>
$('#datepicker2').datepicker({
dateFormat: "dd-M-yy"
dateFormat: "yy-mm-dd"
});
$("#datepicker1").datepicker({
dateFormat: "dd-M-yy",
dateFormat: "yy-mm-dd",
minDate: 0,
onSelect: function(date){
var date1 = $('#datepicker1').datepicker('getDate');
......
......@@ -46,6 +46,7 @@ Route::group(['middleware' => 'auth'], function () {
#adminlte_routes
});
Route::get('detailhomestay/{id}','CustomerController@detailhomestay');
Route::get('history/{id}','CustomerController@hitory');
Route::get('daftar','CustomerController@register');
Route::post('daftar','CustomerController@registerStore');
Route::post('book','CustomerController@booking');
......
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