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,7 +40,7 @@
<br><br>
<div class="details agilets w3layouts">
<h2 style="margin-bottom: 10px;"> Daftar Booking </h2>
<h2 style="margin-bottom: 10px;"> Daftar Booking </h2>
<div class="container">
<div class="cuisines agileits w3layouts">
<div class="container">
......@@ -65,7 +65,7 @@
</div>
</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