diff --git a/app/Http/Controllers/CustomerController.php b/app/Http/Controllers/CustomerController.php index b1ccaf4..319466f 100644 --- a/app/Http/Controllers/CustomerController.php +++ b/app/Http/Controllers/CustomerController.php @@ -60,14 +60,20 @@ class CustomerController extends Controller } - public function editProfile(){ - + public function editProfile($id){ + $data = Customer::find($id); + //dd($data); + return view('adminlte::layouts.customers.editprofiles')->with('data',$data); } public function detailhomestay($id){ - $data = Homestay::find($id); + $data = DB::table('homestay') + ->join('pemilikhomestay','homestay.idPemilik','=','pemilikhomestay.id') + ->select('pemilikhomestay.*','homestay.*') + ->where('homestay.id','=',$id) + ->get(); //dd($data); - return view('adminlte::layouts.pages.Homestay')->with('data',$data); + return view('adminlte::layouts.pages.Homestay')->with('data',$data[0]); } } diff --git a/resources/views/vendor/adminlte/layouts/pages/editprofiles.blade.php b/resources/views/vendor/adminlte/layouts/customers/editprofiles.blade.php similarity index 100% rename from resources/views/vendor/adminlte/layouts/pages/editprofiles.blade.php rename to resources/views/vendor/adminlte/layouts/customers/editprofiles.blade.php diff --git a/resources/views/vendor/adminlte/layouts/customers/profiles.blade.php b/resources/views/vendor/adminlte/layouts/customers/profiles.blade.php index bfc7f09..2b78f9e 100644 --- a/resources/views/vendor/adminlte/layouts/customers/profiles.blade.php +++ b/resources/views/vendor/adminlte/layouts/customers/profiles.blade.php @@ -37,7 +37,7 @@ <div class="services agileits w3layouts" style="background-color: #fff; padding: 1px 1px 1px 0px; margin-top: 30px;"> - <a class="agileits w3layoutswow slideInLeft" href="gallery.html" >Edit Profile <span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></a> + <a class="agileits w3layoutswow slideInLeft" href="{{url('editProfileCustomer/'.$data->id_Pelanggan)}}" >Edit Profile <span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></a> <a class="agileits w3layoutswow slideInLeft" href="gallery.html">History <span class="glyphicon agileits w3layouts glyphicon-arrow-right" aria-hidden="true"></span></a> </div> diff --git a/resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php b/resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php index 55c0b11..cd54e40 100644 --- a/resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php +++ b/resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php @@ -3,7 +3,7 @@ <!-- Banner --> <div class="banner agileits w3layouts"> <img src="{{asset('img/banner.jpg')}}" alt="Agileits W3layouts"> - <h1 class="wow agileits w3layouts fadeInDown">HOMESTAY MAWAR</h1> + <h1 class="wow agileits w3layouts fadeInDown">{{$data->namaHomestay}}</h1> </div> <!-- //Banner --> @@ -95,18 +95,17 @@ <div class="col-md-6 col-sm-6 cuisines-grids agileits w3layouts cuisines-grids-1 wow slideInLeft"> <h2 style="margin-bottom: 10px;"> Fasilitas </h2> <ul style="list-style-type: none;"> - <li> Air Panas </li> - <li> Alat Panggang </li> - <li> Kamar mandi bersih </li> - <li> 3 Kamar Tidur </li> - <li> Tepat dipinggi danau </li> + <p>{{$data->fasilitas}}</p> </ul> <!-- <p>Lorem ipsum dolor sit amet, consectetur adipisicing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis aute irure dolor in reprehenderit in voluptate velit esse cillum dolore eu fugiat nulla pariatur. Excepteur sint occaecat cupidatat non proident, sunt in culpa qui officia deserunt mollit anim id est laborum.</p> --> <img style="width: 450px; margin-top: 10px;" src="{{asset('img/line1.png')}}"> <h2 style="margin-bottom: 10px;"> Info Pemilik </h2> <ul style="list-style-type: none;"> - <li> Pemilik : Palti Sinaga </li> - <li> No Telp : +62 8123182739 </li> + <li> Pemilik : {{$data->nama}}</li> + <li> No Telp : {{$data->noTelepon}} </li> + <li> Alamat : {{$data->alamat}}</li> + <li> Pekerjaan : {{$data->pekerjaan}}</li> + <li> No Rekening : {{$data->noRekening}}</li> </ul> </div> <div class="col-md-6 col-sm-6 cuisines-grids agileits w3layouts cuisines-grids-2 wow slideInRight"> diff --git a/resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php b/resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php index 4f39767..91a0ed4 100644 --- a/resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php +++ b/resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php @@ -47,6 +47,7 @@ <div class="pull-left"> <a href="{{ url('customerProfile') }}" class="btn btn-default btn-flat">{{ trans('adminlte_lang::message.profile') }}</a> </div> + <div class="pull-right"> <a href="{{ url('/logout') }}" class="btn btn-default btn-flat" onclick="event.preventDefault(); diff --git a/routes/web.php b/routes/web.php index 0353dc7..1f29c74 100644 --- a/routes/web.php +++ b/routes/web.php @@ -43,11 +43,10 @@ Route::group(['middleware' => 'auth'], function () { //Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly. #adminlte_routes }); - Route::get('detailhomestay/{id}','CustomerController@detailhomestay'); Route::get('daftar','CustomerController@register'); Route::post('daftar','CustomerController@registerStore'); -Route::get('editProfileCustomer','CustomerController@editProfile'); +Route::get('editProfileCustomer/{id}','CustomerController@editProfile'); Route::resource('admin', 'AdminController'); Route::get('listowner','AdminController@listOwner'); Route::resource('owner','OwnerController');