Commit 8610a999 by Juliper

Fungsi admin dan owner OnGoing to finish

parent 13548bab
......@@ -2,21 +2,18 @@
namespace App\Http\Controllers;
use App\RequestHomestay;
use Illuminate\Http\Request;
use App\User;
use Validator;
use App\Http\Controllers\Controller;
use Illuminate\Foundation\Auth\RegistersUsers;
use App\Owner;
use Illuminate\Support\Facades\DB;
class AdminController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('adminlte::home');
......@@ -30,22 +27,12 @@ class AdminController extends Controller
return view('adminlte::layouts.admin.listOwner')->with('data',$data)->with('count',$count);
}
/**
* Show the form for creating a new resource.
*
* @return \Illuminate\Http\Response
*/
public function create()
{
return view('adminlte::layouts.admin.addOwner');
}
/**
* Store a newly created resource in storage.
*
* @param \Illuminate\Http\Request $request
* @return \Illuminate\Http\Response
*/
public function store(Request $request)
{
$data = $request->all();
......@@ -71,46 +58,49 @@ class AdminController extends Controller
return redirect(url('admin/create'))->with('info', 'User berhasil ditambah ');
}
/**
* Display the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function show($id)
{
//
}
/**
* Show the form for editing the specified resource.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function edit($id)
{
//
}
/**
* Update the specified resource in storage.
*
* @param \Illuminate\Http\Request $request
* @param int $id
* @return \Illuminate\Http\Response
*/
public function update(Request $request, $id)
{
//
}
/**
* Remove the specified resource from storage.
*
* @param int $id
* @return \Illuminate\Http\Response
*/
public function RequestHomestay(){
$data = DB::table('pemilikhomestay')
->join('pengajuan_homestay','pemilikhomestay.id','=','pengajuan_homestay.idPemilikHomestay')
->select('pemilikhomestay.nama','pengajuan_homestay.*')
->get();
$count = $data->count();
//dd($data[0]->nama,"berhasil",$count);
return view('adminlte::layouts.admin.listPengajuan')->with('data',$data)
->with('count',$count);
}
public function RequestFasilitas(){
$data = DB::table('pemilikhomestay')
->join('requestfasilitas','pemilikhomestay.id','=','requestfasilitas.id_pemilik_homestay')
->select('pemilikhomestay.nama','requestfasilitas.*')
->get();
//dd('masuk agan');
$count = $data->count();
return view('adminlte::layouts.admin.listRequestFasilitas')->with('data',$data)->with('count',$count);
}
public function destroy($id)
{
//
......
......@@ -2,6 +2,8 @@
namespace App\Http\Controllers;
use App\RequestFasilitas;
use App\RequestHomestay;
use Illuminate\Http\Request;
use App\User;
use App\Owner;
......@@ -21,6 +23,103 @@ class OwnerController extends Controller
//
}
public function requestFasilitas(){
//dd('Masuk Gan');
return view('adminlte::layouts.owner.RequestFasilitas');
}
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')
->select('pemilikhomestay.id')
->where('users.id', '=', Auth::user()->id)
->get();
//dd($request['id_kategoriFasiltas']);
$data = new RequestFasilitas();
$data->id_pemilik_homestay = $idPemilik[0]->id;
$data->id_kategoriFasiltas = $request['id_kategoriFasiltas'];
$data->namaRequestFasilitas = $request['namaRequestFasilitas'];
$data->deskripsi = $request['deskripsi'];
$data->jumlah = $request['jumlah'];
$data->save();
//dd("Berhasil Gan");
}
public function pengajuan(){
return view('adminlte::layouts.owner.PengajuanHomestay');
}
public function storePengajuan(Request $request){
$idPemilik = DB::table('users')
->join('pemilikhomestay','users.id','=','pemilikhomestay.id_Akun')
->select('pemilikhomestay.id')
->where('users.id', '=', Auth::user()->id)
->get();
$data = new RequestHomestay();
$data->idPemilikHomestay = $idPemilik[0]->id;
$data->namaHomestay = $request['namaHomestay'];
$data->jumlahKamar = $request['jumlahKamar'];
$data->status = 0;
$data->save();
dd($request['namaHomestay'],$request['jumlahKamar']);
}
public function listPengajuan(){
$idPemilik = DB::table('users')
->join('pemilikhomestay','users.id','=','pemilikhomestay.id_Akun')
->select('pemilikhomestay.id')
->where('users.id', '=', Auth::user()->id)
->get();
//dd($idPemilik);
$data = DB::table('pengajuan_homestay')
->join('pemilikhomestay','pengajuan_homestay.idPemilikHomestay','=','pemilikhomestay.id')
->select('pemilikhomestay.nama','pengajuan_homestay.*')
->where('pengajuan_homestay.idPemilikHomestay','=',$idPemilik[0]->id)
->get();
$count = $data->count();
return view('adminlte::layouts.owner.ListPengajuanHomestay')->with('data',$data)->with('count',$count);
}
public function listPengajuanFasilitas(){
$idPemilik = DB::table('users')
->join('pemilikhomestay','users.id','=','pemilikhomestay.id_Akun')
->select('pemilikhomestay.id')
->where('users.id', '=', Auth::user()->id)
->get();
$data = DB::table('requestfasilitas')
->join('pemilikhomestay','requestfasilitas.id_pemilik_homestay','=','pemilikhomestay.id')
->select('pemilikhomestay.nama','requestfasilitas.*')
->where('requestfasilitas.id_pemilik_homestay','=',$idPemilik[0]->id)
->get();
$count = $data->count();
return view('adminlte::layouts.owner.ListPengajuanFasilitas')->with('data',$data)->with('count',$count);
}
public function store(Request $request)
{
//
......
......@@ -114,7 +114,7 @@ class ProfileController extends Controller
$user->update();
$owner->update();
$data = DB::table('pemilikhomestay')->where('nama', $request['nama'])->first();
//$data = DB::table('pemilikhomestay')->where('nama', $request['nama'])->first();
//dd('succes Gan');
......
<?php
namespace App\Http\Controllers;
use App\Room;
use Illuminate\Http\Request;
use App\User;
use App\Owner;
use Illuminate\Support\Facades\Auth;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\MessageBag;
use Illuminate\Support\Facades\Input;
class RoomController extends Controller
{
/**
* Display a listing of the resource.
*
* @return \Illuminate\Http\Response
*/
public function index()
{
return view('adminlte::layouts.owner.addRoom');
}
public function create()
{
//
}
public function listRoom(){
$i=1;
$data = Room::all();
$count = Room::all()->where('id_pemilik_homesaty',Auth::user()->id)->count();
return view('adminlte::layouts.owner.listRoom')->with('data',$data)->with('count',$count)->with('i',$i);
}
public function store(Request $request)
{
//dd($request['jumlah_bed'],$request['deskripsi']);
//$users = User::find(Auth::user()->id);
$room = new Room();
$room->id_pemilik_homesaty = Auth::user()->id;
$room->jumlah_bed = $request['jumlah_bed'];
$room->deskripsi = $request['deskripsi'];
$room->save();
return redirect('room');
}
public function show($id)
{
//
}
public function edit($id)
{
//
}
public function update(Request $request, $id)
{
//
}
public function destroy($id)
{
//
}
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class RequestFasilitas extends Model
{
protected $table = "requestfasilitas";
protected $fillable = [
'id','id_pemilik_homestay', 'id_kategoriFasiltas', 'namaRequestFasilitas','deskripsi','jumlahKamar','jumlah','gambar',
];
public $timestamps = false;
}
<?php
namespace App;
use Illuminate\Database\Eloquent\Model;
class RequestHomestay extends Model
{
protected $table = "pengajuan_homestay";
protected $fillable = [
'idPengajuan', 'idPemilikHomestay', 'idPgwDinasPariwisata','nama','jumlahKamar','status',
];
public $timestamps = false;
}
......@@ -9,7 +9,7 @@ class Room extends Model
protected $table = "kamar";
protected $fillable = [
'id_pemilik_homestay', 'jumlah_bed', 'deskripsi',
'id_pemilik_homestay', 'jumlah_bed', 'fasilitas',
];
public $timestamps = false;
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div id="app">
@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 class="register-box-body">
<p class="login-box-msg">{{ trans('adminlte_lang::message.registermember') }}</p>
<form action="{{ url('admin') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="{{ trans('adminlte_lang::message.fullname') }}" name="name" value="{{ old('name') }}"/>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="{{ trans('adminlte_lang::message.username') }}" name="username" value="{{ old('username') }}"/>
<span class="glyphicon glyphicon-user form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="email" class="form-control" placeholder="{{ trans('adminlte_lang::message.email') }}" name="email" value="{{ old('email') }}"/>
<span class="glyphicon glyphicon-envelope form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="{{ trans('adminlte_lang::message.password') }}" name="password"/>
<span class="glyphicon glyphicon-lock form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input type="password" class="form-control" placeholder="{{ trans('adminlte_lang::message.retrypepassword') }}" name="password_confirmation"/>
<span class="glyphicon glyphicon-log-in form-control-feedback"></span>
</div>
<div class="form-group has-feedback">
<input value="Owner" type="text" class="form-control" placeholder="{{ trans('adminlte_lang::message.role') }}" name="role" disabled/>
<span class="glyphicon glyphicon-wrench form-control-feedback"></span>
</div>
<div class="row">
<div class="col-xs-1">
<label>
<div class="checkbox_register icheck">
<label>
<input type="checkbox" name="terms">
</label>
</div>
</label>
</div><!-- /.col -->
<div class="col-xs-6">
<div class="form-group">
<button type="button" class="btn btn-block btn-flat" data-toggle="modal" data-target="#termsModal">{{ trans('adminlte_lang::message.terms') }}</button>
</div>
</div><!-- /.col -->
<div class="col-xs-4 col-xs-push-1">
<button type="submit" class="btn btn-primary btn-block btn-flat">{{ trans('adminlte_lang::message.register') }}</button>
</div><!-- /.col -->
</div>
</form>
</div><!-- /.form-box -->
</div>
</div>
</div>
</div>
</div>
@endsection
\ No newline at end of file
......@@ -43,9 +43,12 @@
<th>Email</th>
</tr>
@foreach($data as $a)
<td>{{$a->name}}</td>
<td>{{$a->username}}</td>
<td>{{$a->email}}</td>
<tr>
<td>{{$a->name}}</td>
<td>{{$a->username}}</td>
<td>{{$a->email}}</td>
</tr>
@endforeach
</table>
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div id="app">
@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
<br>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-info">
<span class="info-box-icon bg-yellow"><i class="ion ion-ios-people-outline"></i></span>
<div class="info-box-content">
<span class="info-box-text">List Pengajuan</span>
<span class="info-box-number">{{$count}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<br>
<table class="table table-striped">
<tr>
<th>Pengaju</th>
<th>Nama Homestay</th>
<th>Jumlah Kamar</th>
<th colspan="2">Acction</th>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->namaHomestay}}</td>
<td>{{$a->jumlahKamar}}</td>
<td><a href="{{url('room/'.$a->idPengajuan.'/edit')}}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"> Terima</i></a></td>
<td>
<form action="{{url('room/'.$a->idPengajuan)}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"> Tolak</i></button>
</form>
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div id="app">
@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
<br>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-info">
<span class="info-box-icon bg-yellow"><i class="ion ion-ios-people-outline"></i></span>
<div class="info-box-content">
<span class="info-box-text">List Pengajuan</span>
<span class="info-box-number">{{$count}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<br>
<table class="table table-striped">
<tr>
<th>Pengaju</th>
<th>Nama Request Fasilitas</th>
<th>Deskripsi</th>
<th>Jumlah</th>
<th>Gambar</th>
<th colspan="2">Acction</th>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->namaRequestFasilitas}}</td>
<td>{{$a->deskripsi}}</td>
<td>{{$a->jumlah}}</td>
<td>@if($a->gambar==null)
<img alt="Gambar Tidak Ada" class="img-circle img-responsive">
@else
<img alt="User Pic" src="img/{{$data->gambar}}" class="img-circle img-responsive">
@endif
</td>
<td><a href="{{url('room/'.$a->id.'/edit')}}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"> Terima</i></a></td>
<td>
<form action="{{url('room/'.$a->id)}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"> Tolak</i></button>
</form>
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div id="app">
@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
<br>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-info">
<span class="info-box-icon bg-yellow"><i class="glyphicon glyphicon-modal-window"></i></span>
<div class="info-box-content">
<span class="info-box-text">List Pengajuan Fasilitas</span>
<span class="info-box-number">{{$count}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<br>
<table class="table table-striped">
<tr>
<th>Pengaju</th>
<th>Judul</th>
<td>Deskripsi</td>
<td>jumlah</td>
<td>Gambar</td>
<td>Status</td>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->namaRequestFasilitas}}</td>
<td>{{$a->deskripsi}}</td>
<td>{{$a->jumlah}}</td>
<td>
@if($a->gambar==null)
<img alt="Gambar Tidak Ada" class="img-circle img-responsive">
@else
<img alt="User Pic" src="img/{{$data->gambar}}" class="img-circle img-responsive">
@endif
</td>
<td>@if($a->status==0) Sedang Menunggu
@elseif($a->status==1) Diterima
@elseif($a->status==2) Ditolak
@endif
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div id="app">
@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
<br>
<div class="col-md-4 col-sm-6 col-xs-12">
<div class="info-box bg-info">
<span class="info-box-icon bg-yellow"><i class="glyphicon glyphicon-modal-window"></i></span>
<div class="info-box-content">
<span class="info-box-text">List Pengajuan Homestay</span>
<span class="info-box-number">{{$count}}</span>
</div>
<!-- /.info-box-content -->
</div>
<!-- /.info-box -->
</div>
<br>
<table class="table table-striped">
<tr>
<th>Pengaju</th>
<th>Nama Homestay</th>
<td>Jumlah Kamar</td>
<td>Status</td>
</tr>
@foreach($data as $a)
<tr>
<td>{{$a->nama}}</td>
<td>{{$a->namaHomestay}}</td>
<td>{{$a->jumlahKamar}}</td>
<td>@if($a->status==0) Sedang Menunggu
@elseif($a->status==1) Diterima
@elseif($a->status==2) Ditolak
@endif
</td>
</tr>
@endforeach
</table>
</div>
</div>
</div>
</div>
</div>
@endsection
......@@ -13,26 +13,26 @@
<div class="panel-body">
<div class="row">
You Aare Here!!
Add Your Room and nice Description
<form action="{{ url('room') }}" method="post">
<form action="{{ url('pengajuanHomestay') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<br>
<label>Jumlah Bed</label>
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="Jumlah Bed" name="jumlah_bed" />
<label>Nama Homestay</label>
<div class="">
<input type="text" class="form-control" placeholder="Nama Homestay" name="namaHomestay"/>
<span class="fa fa-sort-numeric-asc form-control-feedback"></span>
</div>
<label>Dekripsi</label>
<div class="form-group has-feedback">
<input type="text" class="form-control" placeholder="Deskripsi" name="deskripsi"/>
<span class="fa fa-text-width form-control-feedback"></span>
<label>Jumlah Kamar</label>
<div class="">
<input type="text" class="form-control" placeholder="Jumlah Kamar" name="jumlahKamar" />
<span class="fa fa-sort-numeric-asc form-control-feedback"></span>
</div>
<br>
<div class="col-xs-4 col-xs-push-8">
<button type="submit" class="btn btn-primary btn-block btn-flat">Tambah</button>
<button type="submit" class="btn btn-primary btn-block btn-flat">Ajukan</button>
</div><!
</form>
</form>
</div>
</div>
</div>
</div>
</div>
</div>
......
@extends('adminlte::layouts.app')
@section('htmlheader_title')
{{ trans('adminlte_lang::message.home') }}
@endsection
@section('main-content')
<div class="container-fluid spark-screen">
<div class="row">
<div class="col-md-10 col-md-offset-1">
<div class="panel panel-default">
<div class="panel-heading">
<div class="panel-body">
<div class="row">
You Aare Here!!
<form action="{{ url('reqFasilitas') }}" method="post">
<input type="hidden" name="_token" value="{{ csrf_token() }}">
<br>
<label>Judul</label>
<div class="">
<input type="text" class="form-control" placeholder="Nama Request Fasilitas" name="namaRequestFasilitas"/>
<span class="fa fa-sort-numeric-asc form-control-feedback"></span>
</div>
<label>Deskripsi</label>
<div class="">
<input type="text" class="form-control" placeholder="Deskripsi" name="deskripsi" />
<span class="fa fa-sort-numeric-asc form-control-feedback"></span>
</div>
<label>Jumlah</label>
<div class="">
<input type="text" class="form-control" placeholder="Jumlah" name="jumlah"/>
<span class="fa fa-text-width form-control-feedback"></span>
</div>
<label>Kategori</label>
<div class="">
<select name="id_kategoriFasiltas" class="">
<option value=1> Kamar Tidur </option>
<option value=2> Perlatan Kamar Mandi </option>
</select>
{{--<input id="role" class="form-control" name="role" required>--}}
</div>
<br>
<div class="col-xs-4 col-xs-push-8">
<button type="submit" class="btn btn-primary btn-block btn-flat">Ajukan</button>
</div><!
</form>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
@endsection
\ No newline at end of file
......@@ -38,14 +38,31 @@
<table class="table table-striped">
<tr>
<th>No</th>
<th>No Kamar</th>
<th>Jumlah Bed</th>
<th>Deksripsi</th>
<td>Detail</td>
<td>Edit</td>
<td>Delete</td>
</tr>
@foreach($data as $a)
<td>{{$i++}}</td>
<td>{{$a->jumlah_bed}}</td>
<td>{{$a->deskripsi}}</td>
<tr>
<td>{{$a->nomor_kamar}}</td>
<td>{{$a->jumlah_bed}}</td>
<td>
<a href="{{url('room/'.$a->id)}}" class="btn btn-primary"><i class="glyphicon glyphicon-eye-open"></i></a>
</td>
<td>
<a href="{{url('room/'.$a->id.'/edit')}}" class="btn btn-primary"><i class="glyphicon glyphicon-edit"></i></a>
</td>
<td>
<form action="{{url('room/'.$a->id)}}" method="POST">
{{csrf_field()}}
<input type="hidden" name="_method" value="DELETE">
<button type="submit" class="btn btn-danger"><i class="glyphicon glyphicon-trash"></i></button>
</form>
</td>
</tr>
@endforeach
</table>
......
......@@ -19,28 +19,36 @@
@endif
<!-- search form (Optional) -->
<form action="#" method="get" class="sidebar-form">
<div class="input-group">
<input type="text" name="q" class="form-control" placeholder="{{ trans('adminlte_lang::message.search') }}..."/>
<span class="input-group-btn">
<button type='submit' name='search' id='search-btn' class="btn btn-flat"><i class="fa fa-search"></i></button>
</span>
</div>
</form>
<!-- /.search form -->
<!-- Sidebar Menu -->
<ul class="sidebar-menu">
@if(Auth::user()->role =="Admin")
<li class="header">{{ trans('adminlte_lang::message.header') }}</li>
@if(Auth::user()->role =="DinasPariwisata")
<!-- Optionally, you can add icons to the links -->
<li><a href="{{ url('home') }}"><i class='fa fa-home'></i> <span>{{ trans('adminlte_lang::message.home') }}</span></a></li>
<li><a href="{{url('admin/create')}}"><i class='fa fa-plus'></i> <span>{{ trans('adminlte_lang::message.addOwner') }}</span></a></li>
<li><a href="{{url('listowner')}}"><i class='fa fa-list'></i> <span>{{ trans('adminlte_lang::message.listOwner') }}</span></a></li>
<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="#"><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")
<li><a href="{{ url('room') }}"><i class='fa fa-plus'></i> <span>{{ trans('adminlte_lang::message.addRoom') }}</span></a></li>
<li><a href="{{ url('listRoom') }}"><i class='fa fa-list'></i> <span>{{ trans('adminlte_lang::message.addRoom') }}</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Edit Room</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Daftar Pesanan</span></a></li>
<li><a href="{{url('reqFasilitas')}}"><i class='fa fa-list'></i> <span>Request Fasilitas</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Add Book Manual</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Daftar Kamar</span></a></li>
<li><a href="listPengajuan"><i class="fa fa-list"></i><span>Daftar Pengajuan Homestay</span></a></li>
<li><a href="listPengajuanFasilitas"><i class='fa fa-list'></i> <span>Daftar Pengajuan Fasilitas</span></a></li>
<li><a href="pengajuanHomestay"><i class='fa fa-list'></i> <span>Pengajuan Homestay</span></a></li>
@elseif(Auth::user()->role=="Customer")
<li><a href="#"><i class='fa fa-list'></i> <span>Booking Homestay</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Give Some Feedback</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Cek Detail Homestay</span></a></li>
<li><a href="#"><i class='fa fa-list'></i> <span>Pembayaran</span></a></li>
@endif
......
......@@ -37,9 +37,18 @@ Route::resource('owner','OwnerController');
route::get('profile','OwnerController@profile');
Route::get('profile/{id}/profiledit','OwnerController@editProfile');
Route::get('profileUpdate/{id}','OwnerController@updatePro');
Route::get('requestHomestay','AdminController@RequestHomestay');
Route::get('requestFasilitas','AdminController@RequestFasilitas');
Route::get('pengajuanHomestay','OwnerController@pengajuan');
Route::post('pengajuanHomestay','OwnerController@storePengajuan');
Route::get('listPengajuan','OwnerController@listPengajuan');
Route::get('listPengajuanFasilitas','OwnerController@listPengajuanFasilitas');
Route::resource('profile','ProfileController');
Route::resource('room','RoomController');
Route::get('listRoom','RoomController@listRoom');
Route::get('reqFasilitas','OwnerController@requestFasilitas');
Route::post('reqFasilitas','OwnerController@storeRequest');
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