Commit 489733a5 by Juliper

admin will be done guys

parent e3d483f7
......@@ -3,6 +3,7 @@
namespace App\Http\Controllers;
use App\Homestay;
use App\ListBook;
use App\RequestHomestay;
use App\Room;
use Illuminate\Http\Request;
......@@ -23,7 +24,15 @@ class AdminController extends Controller
}
public function listPesanan(){
$data = DB::table('homestay')
->join('daftar_book','homestay.id','=','daftar_book.homestay')
->select('daftar_book.*','homestay.namaHomestay','homestay.owner')
->get();
//dd($data);
return view('adminlte::layouts.admin.dataPemesanan')->with('data',$data);
}
public function listOwner(){
......
......@@ -199,6 +199,7 @@ class CustomerController extends Controller
$lb->homestay = $request['id'];
$lb->nama_pemesan = $data2[0]->nama;
$lb->jumlah_kamar = $request['jumlah_kamar'];
$lb->tanggal_mulai = $request['tanggal'] ;
$lb->tanggal_berakhir = $baru;
......
......@@ -70,7 +70,6 @@ class OwnerController extends Controller
->get();
$data = DB::table('homestay')
//->join('transaksi','transaksi.id_homestay','=','homestay.id')
->join('pemilikhomestay','homestay.idPemilik','=','pemilikhomestay.id')
->join('transaksi','homestay.id','=','transaksi.id_homestay')
->join('pelanggan','transaksi.id_pelanggan','=','pelanggan.id')
......@@ -78,7 +77,6 @@ class OwnerController extends Controller
->where('homestay.idPemilik','=',$dataPel[0]->id)
->get();
//dd("masuk agan",$data,$data->count());
return view('adminlte::layouts.owner.listPesanan')->with('data',$data)->with('count',$data->count());
}
......@@ -87,11 +85,6 @@ class OwnerController extends Controller
}
public function storeRequest(Request $request){
/*$data = DB::table('pemilikhomestay')
->join('pengajuan_homestay','pemilikhomestay.id','=','pengajuan_homestay.idPemilikHomestay')
->select('pemilikhomestay.nama','pengajuan_homestay.*')
->get();
*/
$idPemilik = DB::table('users')
->join('pemilikhomestay','users.id','=','pemilikhomestay.id_Akun')
......@@ -99,7 +92,6 @@ class OwnerController extends Controller
->where('users.id', '=', Auth::user()->id)
->get();
//dd($request['id_kategoriFasiltas']);
$data = new RequestFasilitas();
......@@ -111,7 +103,6 @@ class OwnerController extends Controller
$data->save();
//dd("Berhasil Gan");
}
public function pengajuan(){
......
......@@ -38,19 +38,22 @@
<tr>
<th>Nama Homestay</th>
<th>Nama Pemilik Homstay</th>
<th>Nama Pemesan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Jumlah penginap</th>
<th>Jumlah Kamar yang dipesan</th>
</tr>
@foreach($data as $a)
<tr>
<td>Hom Staywithme</td>
<td>Palti Sinaga</td>
<td>Dari sekarang</td>
<td>sampai sekarang</td>
<td>Banyak </td>
<td>{{$a->namaHomestay}}</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>
......
......@@ -29,7 +29,7 @@
<li><a href="{{url('requestFasilitas')}}"><i class='fa fa-home'></i> <span>Acc Request Fasilitas</span></a></li>
<li><a href="{{url('admin/create')}}"><i class='fa fa-plus'></i> <span>Add Owner</span></a></li>
<li><a href="{{url('requestHomestay')}}"><i class='fa fa-list'></i> <span>Acc Pengajuan Homestay</span></a></li>
<li><a href="{{url('datapemesanan')}}"><i class='fa fa-list'></i> <span>Melihat Data Pemesanan</span></a></li>
<li><a href="{{url('listPemesanan')}}"><i class='fa fa-list'></i> <span>Melihat Data Pemesanan</span></a></li>
<li><a href="{{url('listowner')}}"><i class='fa fa-list'></i> <span>Melihat Daftar Owner</span></a></li>
@elseif(Auth::user()->role=="Owner")
......
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