Commit 87240297 by Juliper

new mas bro

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