Commit 19d4353b by Palti Sinaga

12345678

parent 9174037e
...@@ -64,6 +64,8 @@ class AdminController extends Controller ...@@ -64,6 +64,8 @@ class AdminController extends Controller
return view('adminlte::layouts.admin.listhomestay')->with('data',$data); return view('adminlte::layouts.admin.listhomestay')->with('data',$data);
} }
public function cariPesanan(Request $request){ public function cariPesanan(Request $request){
$dataHomestay = Homestay::where('nama_homestay',$request['nama_homestay'])->get(); $dataHomestay = Homestay::where('nama_homestay',$request['nama_homestay'])->get();
...@@ -104,10 +106,15 @@ class AdminController extends Controller ...@@ -104,10 +106,15 @@ class AdminController extends Controller
$penghasilan += $biaya; $penghasilan += $biaya;
} }
dd($data,$data2,$penghasilan); // dd($data,$data2,$penghasilan);
// dd('masuk',$request['bulan'],$request['nama_homestay'],$data);
return view('adminlte::layouts.admin.resultlistpesanan')->with('data',$data);
}
public function resultlistpesanan(){
dd('masuk',$request['bulan'],$request['nama_homestay'],$data);
return view('');
} }
public function Allfeedback(){ public function Allfeedback(){
...@@ -131,9 +138,9 @@ class AdminController extends Controller ...@@ -131,9 +138,9 @@ class AdminController extends Controller
$dataFeedback = DB::table('feedback') $dataFeedback = DB::table('feedback')
->join('pemilikhomestay','feedback.id_pemilik_homestay','=','pemilikhomestay.id') ->join('pemilikhomestay','feedback.id_pemilik_homestay','=','pemilikhomestay.id')
->join('pelanggan','feedback.id_pelanggan','=','pelanggan.id') ->join('pelanggan','feedback.id_pelanggan','=','pelanggan.id')
->select('pemilikhomestay.id','feedback.feedback','pelanggan.nama') ->select('pemilikhomestay.id','feedback.feedback','pelanggan.nama','feedback.created_at','feedback.id')
->where('pemilikhomestay.id','=',$id) ->where('pemilikhomestay.id','=',$id)
->paginate(4); ->paginate(10);
//dd($dataFeedback); //dd($dataFeedback);
return view('adminlte::layouts.admin.feedback')->with('data',$dataFeedback); return view('adminlte::layouts.admin.feedback')->with('data',$dataFeedback);
...@@ -151,7 +158,10 @@ class AdminController extends Controller ...@@ -151,7 +158,10 @@ class AdminController extends Controller
public function owner($id){ public function owner($id){
$data = Owner::where('id_akun',$id)->get(); $data = Owner::where('id_akun',$id)
->join('users','pemilikhomestay.id_akun','=','users.id')
->select('users.username','pemilikhomestay.*')
->get();
// dd($data[0]); // dd($data[0]);
return view('adminlte::layouts.admin.updateOwner')->with('data',$data[0]); return view('adminlte::layouts.admin.updateOwner')->with('data',$data[0]);
......
...@@ -10,12 +10,6 @@ ...@@ -10,12 +10,6 @@
print_r(getdate()); print_r(getdate());
?>/h1> ?>/h1>
<table class="table table-user-information"> test pesanan searc
<tr>
<th>Nama </th>
<td>: </td>
<td>{{$data->nama}}</td>
</tr>
</table>
</body> </body>
</html> </html>
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
@endsection @endsection
@section('main-content') @section('main-content')
<div class="box box-warning"> <div class="box box-primary">
<div class="box-header with-border"> <div class="box-header with-border">
<h3 class="box-title"> DAFTAR PEMILIK HOMESTAY </h3> <h3 class="box-title"> DAFTAR PEMILIK HOMESTAY </h3>
@if (count($errors) > 0) @if (count($errors) > 0)
......
...@@ -21,20 +21,29 @@ ...@@ -21,20 +21,29 @@
</div> </div>
<div class="box-body"> <div class="box-body">
@foreach($data as $a)
<div class="col-sm-12">
<div class="box box-primary">
<div class="box-header with-border">
<h3 class="box-title">{{$a->nama}}</h3>
</div><!-- /.box-header --> <ul class="timeline">
<div class="box-body"> @foreach($data as $a)
<p>{{$a->feedback}}</p>
<li>
<i class="fa fa-comment bg-aqua"></i>
<div class="timeline-item">
<span class="time"><i class="fa fa-clock-o"></i> {{$a->created_at}}</span>
<h3 class="timeline-header" style="border-bottom: 0px;"><a href="#">{{$a->nama}}</a> </h3>
</div><!-- /.box-body --> <div class="timeline-body">
</div><!-- /.box --> {{$a->feedback}}
</div> </div>
<!-- <div class="timeline-footer">
<a class="btn btn-primary btn-xs">Read more</a>
<a class="btn btn-danger btn-xs">Delete</a>
</div> -->
</div>
</li>
@endforeach @endforeach
</ul>
{!! $data->render() !!} {!! $data->render() !!}
</div> </div>
</div> </div>
......
...@@ -9,71 +9,91 @@ ...@@ -9,71 +9,91 @@
<!-- Small boxes (Stat box) --> <!-- Small boxes (Stat box) -->
<div class="row"> <div class="row">
<a href="/listowner" class="small-box-footer">
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<div class="small-box bg-aqua"> <div class="small-box bg-aqua">
<div class="inner"> <div class="inner">
<h3>{{$count}}</h3><br><br> <h3>{{$count}}</h3><br><br>
<p>Data Pemilik Homestay</p> <p>Data Pemilik Homestay <i class="fa fa-arrow-circle-right"></i></p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-users"></i> <i class="fa fa-users"></i>
</div> </div>
<a href="/listowner" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
</div> </div>
</a>
<a href="/listhomestay" class="small-box-footer">
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<!-- small box -->
<div class="small-box bg-green"> <div class="small-box bg-green">
<div class="inner"> <div class="inner">
<h3>{{$countH}}</h3><br><br> <h3>{{$countH}}</h3><br><br>
<p>Data Homestay</p> <p>Data Homestay <i class="fa fa-arrow-circle-right"></i></p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-home"></i> <i class="fa fa-home"></i>
</div> </div>
<a href="/listhomestay" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
</div> </div>
</a>
<a href="/requestFasilitas" class="small-box-footer">
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<div class="small-box bg-yellow"> <div class="small-box bg-yellow">
<div class="inner"> <div class="inner">
<h3>{{$countF}}</h3><br><br> <h3>{{$countF}}</h3><br><br>
<p>Permintaan Fasilitas</p> <p>Permintaan Fasilitas <i class="fa fa-arrow-circle-right"></i></p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-cubes"></i> <i class="fa fa-cubes"></i>
</div> </div>
<a href="/requestFasilitas" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
</div> </div>
</a>
<a href="/requestHomestay" class="small-box-footer">
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<div class="small-box bg-green"> <div class="small-box bg-green">
<div class="inner"> <div class="inner">
<h3>{{$countP}}</h3><br><br> <h3>{{$countP}}</h3><br><br>
<p>Pengajuan Homestay </p> <p>Pengajuan Homestay <i class="fa fa-arrow-circle-right"></i></p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-list"></i> <i class="fa fa-list"></i>
</div> </div>
<a href="/requestHomestay" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
</div> </div>
</a>
<a href="/listPemesanan" class="small-box-footer">
<div class="col-lg-3 col-xs-6"> <div class="col-lg-3 col-xs-6">
<div class="small-box bg-red"> <div class="small-box bg-red">
<div class="inner"> <div class="inner">
<h3>{{$countPesan}}</h3><br><br> <h3>{{$countPesan}}</h3><br><br>
<p>Data Pemesanan </p> <p>Data Pemesanan <i class="fa fa-arrow-circle-right"></i></p>
</div> </div>
<div class="icon"> <div class="icon">
<i class="fa fa-mail-reply"></i> <i class="fa fa-mail-reply"></i>
</div> </div>
<a href="/listPemesanan" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a>
</div> </div>
</div> </div>
</a>
<a href="/Allfeedback" class="small-box-footer">
<div class="col-lg-3 col-xs-6">
<div class="small-box bg-blue">
<div class="inner">
<h3>{{$countPesan}}</h3><br><br>
<p>Feedback Pengunjung <i class="fa fa-arrow-circle-right"></i></p>
</div>
<div class="icon">
<i class="fa fa-comment"></i>
</div>
<!-- <a href="/Allfeedback" class="small-box-footer">Lihat <i class="fa fa-arrow-circle-right"></i></a> -->
</div>
</div>
</a>
</div> </div>
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="box box-warning">
<div class="box-header with-border">
<h3 class="box-title"> DATA PEMESANAN </h3>
@if (count($errors) > 0)
<div class="alert alert-danger">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach ($errors->all() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="box-body">
<!-- <form action="{{url('caripesanan')}}">
<div class="form-group" align="right">
<input type="submit" class="btn btn-warning" value="Print">
</div>
</form> -->
<table class="table table-striped">
<tr>
<th>Nama Homestay</th>
<th>Nama Pemilik Homestay</th>
<th>Nama Pemesan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Jumlah Kamar yang dipesan</th>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama_homestay}}</td>
<td>{{$a->owner}}</td>
<td>{{$a->nama_pemesan}}</td>
<td>{{$a->tanggal_mulai}}</td>
<td>{{$a->tanggal_berakhir}}</td>
<td>{{$a->jumlah_kamar}}</td>
</tr>
@endforeach
</table>
</div>
</div>
@endsection
...@@ -45,7 +45,7 @@ ...@@ -45,7 +45,7 @@
<div class="input-group-addon"> <div class="input-group-addon">
<i class="fa fa-bookmark"></i> <i class="fa fa-bookmark"></i>
</div> </div>
<input type="text" class="form-control" placeholder="username" name="username" value="{{$dataUS->username}}"> <input type="text" class="form-control" placeholder="username" name="username" value="{{$data->username}}">
</div> </div>
</div> </div>
......
...@@ -134,5 +134,5 @@ Route::group(['middleware' => 'dinaspariwisata'], function () { ...@@ -134,5 +134,5 @@ Route::group(['middleware' => 'dinaspariwisata'], function () {
Route::get('home','AdminController@Home'); Route::get('home','AdminController@Home');
Route::get('detailreqFasilitas/{id}','AdminController@detailreqFasilitas'); Route::get('detailreqFasilitas/{id}','AdminController@detailreqFasilitas');
Route::get('listhomestay','AdminController@listhomestay'); Route::get('listhomestay','AdminController@listhomestay');
Route::get('resultlistpesanan','AdminController@listhomestay');
}); });
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