Commit 87240297 by Juliper

new mas bro

parent abb3f8ad
......@@ -132,10 +132,6 @@ class CustomerController extends Controller
return view('adminlte::layouts.customers.profiles')->with('data',$data[0]);
}
public function register(){
return view('adminlte::auth.register');
}
public function registerStore(Request $data){
$user = new User();
$user->name = $data['name'];
......
......@@ -34,6 +34,11 @@ class CobaController extends Controller
return view('welcome');
}
public function register(){
return view('adminlte::auth.register');
}
public function detailhomestay($id){
$data = DB::table('homestay')
->join('pemilikhomestay','homestay.idPemilik','=','pemilikhomestay.id')
......@@ -41,7 +46,6 @@ class CobaController extends Controller
->where('homestay.id','=',$id)
->get();
$daftarBook = DB::table('daftar_book')
->select('daftar_book.*')
->where('daftar_book.homestay','=',$id)
......@@ -49,17 +53,14 @@ class CobaController extends Controller
$now = new DateTime();
$nowCurrent = $now->format('Y-m-d');
//dd($nowCurrent);
$dataJumlahKamar = ListBook::all()->where('tanggal_mulai',$nowCurrent);
$avilableRoom = 0;
if($dataJumlahKamar->count() == null){
//dd('disini aja');
$avilableRoom = $data[0]->jumlahKamar;
}else{
//dd($dataJumlahKamar);
$avilableRoom = $dataJumlahKamar[0]->jumlah_kamar;
}
......@@ -68,8 +69,6 @@ class CobaController extends Controller
->where('kamar.idHomestay','=',$id)
->get();
//dd("masuk agan",$id,$dataKamar);
return view('adminlte::layouts.pages.Homestay')->with('data',$data[0])->with('daftarBook',$daftarBook)->with('dataKamar',$dataKamar)->with('avilable',$avilableRoom);
}
}
......@@ -82,12 +82,12 @@ Route::group(['middleware' => 'owner'], function () {
Route::get('listFeedback','OwnerController@feddback');
});
Route::get('detailhomestay/{id}','CobaController@detailhomestay');
Route::get('detailhomestay/{id}','GuestController@detailhomestay');
Route::get('daftar','GuestController@register');
Route::group(['middleware' => 'customer'], function () {
Route::put('upload/{id}','CustomerController@upload');
Route::get('customerHistory','CustomerController@history');
Route::get('daftar','CustomerController@register');
Route::post('daftar','CustomerController@registerStore');
Route::post('book','CustomerController@booking');
Route::get('buktipembayaran/{id}','CustomerController@bukti');
......
......@@ -54,7 +54,7 @@ return array(
'App\\Http\\Controllers\\Auth\\LoginController' => $baseDir . '/app/Http/Controllers/Auth/LoginController.php',
'App\\Http\\Controllers\\Auth\\RegisterController' => $baseDir . '/app/Http/Controllers/Auth/RegisterController.php',
'App\\Http\\Controllers\\Auth\\ResetPasswordController' => $baseDir . '/app/Http/Controllers/Auth/ResetPasswordController.php',
'App\\Http\\Controllers\\CobaController' => $baseDir . '/app/Http/Controllers/CobaController.php',
'App\\Http\\Controllers\\CobaController' => $baseDir . '/app/Http/Controllers/GuestController.php',
'App\\Http\\Controllers\\Controller' => $baseDir . '/app/Http/Controllers/Controller.php',
'App\\Http\\Controllers\\HomeController' => $baseDir . '/app/Http/Controllers/HomeController.php',
'App\\Http\\Kernel' => $baseDir . '/app/Http/Kernel.php',
......
......@@ -425,7 +425,7 @@ class ComposerStaticInitff6046e218d4cd186580e28a14fe15c5
'App\\Http\\Controllers\\Auth\\LoginController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/LoginController.php',
'App\\Http\\Controllers\\Auth\\RegisterController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/RegisterController.php',
'App\\Http\\Controllers\\Auth\\ResetPasswordController' => __DIR__ . '/../..' . '/app/Http/Controllers/Auth/ResetPasswordController.php',
'App\\Http\\Controllers\\CobaController' => __DIR__ . '/../..' . '/app/Http/Controllers/CobaController.php',
'App\\Http\\Controllers\\CobaController' => __DIR__ . '/../..',
'App\\Http\\Controllers\\Controller' => __DIR__ . '/../..' . '/app/Http/Controllers/Controller.php',
'App\\Http\\Controllers\\HomeController' => __DIR__ . '/../..' . '/app/Http/Controllers/HomeController.php',
'App\\Http\\Kernel' => __DIR__ . '/../..' . '/app/Http/Kernel.php',
......
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