Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
pa2d4ti06
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Juliper
pa2d4ti06
Commits
db6e70c2
Commit
db6e70c2
authored
May 26, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
7cc7e5c2
Hide whitespace changes
Inline
Side-by-side
Showing
17 changed files
with
87 additions
and
86 deletions
+87
-86
AdminController.php
app/Http/Controllers/AdminController.php
+11
-14
LoginController.php
app/Http/Controllers/Auth/LoginController.php
+1
-1
CustomerController.php
app/Http/Controllers/CustomerController.php
+23
-19
GuestController.php
app/Http/Controllers/GuestController.php
+3
-3
OwnerController.php
app/Http/Controllers/OwnerController.php
+29
-29
Owner.php
app/Http/Middleware/Owner.php
+2
-2
listPengajuan.blade.php
...ews/vendor/adminlte/layouts/admin/listPengajuan.blade.php
+2
-2
listRequestFasilitas.blade.php
...dor/adminlte/layouts/admin/listRequestFasilitas.blade.php
+1
-1
History.blade.php
...views/vendor/adminlte/layouts/customers/History.blade.php
+1
-1
editprofiles.blade.php
.../vendor/adminlte/layouts/customers/editprofiles.blade.php
+1
-1
ListPengajuanFasilitas.blade.php
...r/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
+1
-1
ListPengajuanHomestay.blade.php
...or/adminlte/layouts/owner/ListPengajuanHomestay.blade.php
+2
-2
UpdateHomestay.blade.php
...ws/vendor/adminlte/layouts/owner/UpdateHomestay.blade.php
+1
-1
listPesanan.blade.php
...views/vendor/adminlte/layouts/owner/listPesanan.blade.php
+1
-1
profil.blade.php
...rces/views/vendor/adminlte/layouts/owner/profil.blade.php
+2
-2
updateProfil.blade.php
...iews/vendor/adminlte/layouts/owner/updateProfil.blade.php
+2
-2
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+4
-4
No files found.
app/Http/Controllers/AdminController.php
View file @
db6e70c2
...
...
@@ -33,7 +33,7 @@ class AdminController extends Controller
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'daftar_book'
,
'homestay.id'
,
'='
,
'daftar_book.homestay'
)
->
select
(
'daftar_book.*'
,
'homestay.nama
H
omestay'
,
'homestay.owner'
)
->
select
(
'daftar_book.*'
,
'homestay.nama
_h
omestay'
,
'homestay.owner'
)
->
get
();
return
view
(
'adminlte::layouts.admin.dataPemesanan'
)
->
with
(
'data'
,
$data
);
...
...
@@ -88,8 +88,8 @@ class AdminController extends Controller
$owner
->
nama
=
$data
[
'name'
];
$owner
->
alamat
=
'--'
;
$owner
->
pekerjaan
=
'--'
;
$owner
->
no
T
elepon
=
'--'
;
$owner
->
no
R
ekening
=
'--'
;
$owner
->
no
_t
elepon
=
'--'
;
$owner
->
no
_r
ekening
=
'--'
;
$owner
->
foto
=
'gravatar.png'
;
$user
->
save
();
...
...
@@ -102,7 +102,7 @@ class AdminController extends Controller
public
function
RequestHomestay
(){
$data
=
DB
::
table
(
'pemilikhomestay'
)
->
join
(
'pengajuan_homestay'
,
'pemilikhomestay.id'
,
'='
,
'pengajuan_homestay.id
PemilikH
omestay'
)
->
join
(
'pengajuan_homestay'
,
'pemilikhomestay.id'
,
'='
,
'pengajuan_homestay.id
_pemilik_h
omestay'
)
->
select
(
'pemilikhomestay.nama'
,
'pengajuan_homestay.*'
)
->
get
();
...
...
@@ -124,9 +124,6 @@ class AdminController extends Controller
}
public
function
UpdateRequestFasilitas
(
$id
){
//$data = DB::table('requestfasilitas')->where('id', $id)->first();
$RF
=
RequestFasilitas
::
find
(
$id
);
$RF
->
status
=
1
;
...
...
@@ -154,17 +151,17 @@ class AdminController extends Controller
$RH
->
status
=
1
;
$data
=
DB
::
table
(
'pengajuan_homestay'
)
->
join
(
'pemilikhomestay'
,
'pemilikhomestay.id'
,
'='
,
'pengajuan_homestay.id
PemilikH
omestay'
)
->
join
(
'pemilikhomestay'
,
'pemilikhomestay.id'
,
'='
,
'pengajuan_homestay.id
_pemilik_h
omestay'
)
->
select
(
'pemilikhomestay.nama'
,
'pemilikhomestay.alamat'
)
->
where
(
'pemilikhomestay.id'
,
'='
,
$RH
->
idPemilikHomestay
)
->
get
();
$hs
=
new
Homestay
();
$hs
->
id
P
emilik
=
$RH
->
idPemilikHomestay
;
$hs
->
nama
H
omestay
=
$RH
->
namaHomestay
;
$hs
->
id
_p
emilik
=
$RH
->
idPemilikHomestay
;
$hs
->
nama
_h
omestay
=
$RH
->
namaHomestay
;
$hs
->
owner
=
$data
[
0
]
->
nama
;
$hs
->
alamat
=
$data
[
0
]
->
alamat
;
$hs
->
jumlah
K
amar
=
$RH
->
jumlahKamar
;
$hs
->
jumlah
_k
amar
=
$RH
->
jumlahKamar
;
$hs
->
harga
=
150000
;
$hs
->
status
=
'----'
;
...
...
@@ -175,9 +172,9 @@ class AdminController extends Controller
->
where
(
'homestay.owner'
,
'='
,
$data
[
0
]
->
nama
)
->
get
();
for
(
$i
=
1
;
$i
<=
$RH
->
jumlah
K
amar
;
$i
++
){
for
(
$i
=
1
;
$i
<=
$RH
->
jumlah
_k
amar
;
$i
++
){
$km
=
new
Room
();
$km
->
id
H
omestay
=
$idHts
[
0
]
->
id
;
$km
->
id
_h
omestay
=
$idHts
[
0
]
->
id
;
$km
->
nomor_kamar
=
$i
;
$km
->
jumlah_bed
=
2
;
$km
->
save
();
...
...
@@ -185,5 +182,5 @@ class AdminController extends Controller
$RH
->
update
();
return
redirect
(
'requestHomestay'
);
}
}
app/Http/Controllers/Auth/LoginController.php
View file @
db6e70c2
...
...
@@ -55,7 +55,7 @@ class LoginController extends Controller
if
(
Auth
::
attempt
([
'username'
=>
$request
->
username
,
'password'
=>
$request
->
password
]))
{
//dd(Auth::user()->role);
if
(
Auth
::
user
()
->
role
==
'Admin'
)
{
return
redirect
()
->
intended
(
'/
admin
'
);
return
redirect
()
->
intended
(
'/
home
'
);
}
else
if
(
Auth
::
user
()
->
role
==
'Owner'
){
return
redirect
()
->
intended
(
'/owner'
);
...
...
app/Http/Controllers/CustomerController.php
View file @
db6e70c2
...
...
@@ -48,17 +48,17 @@ class CustomerController extends Controller
$dataPelanggan
=
DB
::
table
(
'pelanggan'
)
->
select
(
'pelanggan.id'
)
->
where
(
'pelanggan.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pelanggan.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataPemilik
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.id
P
emilik'
)
->
select
(
'homestay.id
_p
emilik'
)
->
where
(
'homestay.id'
,
'='
,
$id
)
->
get
();
$feed
=
new
Feedback
();
$feed
->
id_pemilik
H
omestay
=
$dataPemilik
[
0
]
->
idPemilik
;
$feed
->
id
P
elanggan
=
$dataPelanggan
[
0
]
->
id
;
$feed
->
id_pemilik
_h
omestay
=
$dataPemilik
[
0
]
->
idPemilik
;
$feed
->
id
_p
elanggan
=
$dataPelanggan
[
0
]
->
id
;
$feed
->
feedback
=
$request
[
'feedback'
];
$feed
->
save
();
...
...
@@ -96,13 +96,13 @@ class CustomerController extends Controller
public
function
history
(){
$data
=
DB
::
table
(
'pelanggan'
)
->
select
(
'pelanggan.*'
)
->
where
(
'pelanggan.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pelanggan.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataTrans
=
DB
::
table
(
'homestay'
)
->
join
(
'transaksi'
,
'homestay.id'
,
'='
,
'transaksi.id_homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
P
emilik'
,
'='
,
'pemilikhomestay.id'
)
->
select
(
'transaksi.*'
,
'pemilikhomestay.nama'
,
'pemilikhomestay.no
R
ekening'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
_p
emilik'
,
'='
,
'pemilikhomestay.id'
)
->
select
(
'transaksi.*'
,
'pemilikhomestay.nama'
,
'pemilikhomestay.no
_r
ekening'
)
->
where
(
'transaksi.id_pelanggan'
,
'='
,
$data
[
0
]
->
id
)
->
get
();
...
...
@@ -113,7 +113,7 @@ class CustomerController extends Controller
public
function
profile
(){
$data
=
DB
::
table
(
'pelanggan'
)
->
select
(
'pelanggan.*'
)
->
where
(
'pelanggan.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pelanggan.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
return
view
(
'adminlte::layouts.customers.profiles'
)
->
with
(
'data'
,
$data
[
0
]);
...
...
@@ -136,10 +136,10 @@ class CustomerController extends Controller
->
get
();
$cus
=
new
Customer
();
$cus
->
id_
A
kun
=
$dataPel
[
0
]
->
id
;
$cus
->
id_
a
kun
=
$dataPel
[
0
]
->
id
;
$cus
->
nama
=
$data
[
'name'
]
;
$cus
->
alamat
=
"---"
;
$cus
->
no
T
elepon
=
"---"
;
$cus
->
no
_t
elepon
=
"---"
;
$cus
->
pekerjaan
=
"---"
;
$cus
->
save
();
...
...
@@ -168,7 +168,7 @@ class CustomerController extends Controller
$cus
->
alamat
=
$request
[
'alamat'
];
$cus
->
pekerjaan
=
$request
[
'pekerjaan'
];
$cus
->
no
T
elepon
=
$request
[
'noTelepon'
];
$cus
->
no
_t
elepon
=
$request
[
'noTelepon'
];
if
(
$request
->
file
(
'foto'
)
==
null
){
$dataUs
->
foto
=
$dataUs
->
foto
;
...
...
@@ -207,30 +207,34 @@ class CustomerController extends Controller
$lb
=
new
ListBook
();
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.id
H
omestay'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.id
_h
omestay'
)
->
select
(
'kamar.*'
,
'homestay.harga'
,
'homestay.jumlahKamar'
)
->
where
(
'homestay.id'
,
'='
,
$request
[
'id'
])
->
get
();
$dataPemilik
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
P
emilik'
,
'pemilikhomestay.id'
)
->
select
(
'pemilikhomestay.no
T
elepon'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
_p
emilik'
,
'pemilikhomestay.id'
)
->
select
(
'pemilikhomestay.no
_t
elepon'
)
->
where
(
'homestay.id'
,
'='
,
$request
[
'id'
])
->
get
();
$homestayJumlahKamar
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.jumlahKamar'
)
->
where
(
'homestay.id'
,
'='
,
$request
[
'id'
])
->
get
();
$homestayJumlahKamar
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.jumlah_kamar'
)
->
where
(
'homestay.id'
,
'='
,
$request
[
'id'
])
->
get
();
$dataBookingMulai
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'tanggal'
])
->
get
();
$dataBookingBerakhir
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.tanggal_berakhir'
,
'='
,
$request
[
'tanggal'
])
->
get
();
if
(
$dataBookingMulai
->
count
()
>
0
){
$currentJumlahKamar
=
$homestayJumlahKamar
[
0
]
->
jumlah
K
amar
-
$dataBookingMulai
[
0
]
->
jumlah_kamar
;
$currentJumlahKamar
=
$homestayJumlahKamar
[
0
]
->
jumlah
_k
amar
-
$dataBookingMulai
[
0
]
->
jumlah_kamar
;
if
(
$currentJumlahKamar
>=
$request
[
'jumlah_kamar'
]){
...
...
@@ -241,7 +245,7 @@ class CustomerController extends Controller
}
else
{
if
(
$dataBookingBerakhir
->
count
()
>
0
){
$currentJumlahKamar2
=
$homestayJumlahKamar
[
0
]
->
jumlah
K
amar
-
$dataBookingBerakhir
[
0
]
->
jumlah_kamar
;
$currentJumlahKamar2
=
$homestayJumlahKamar
[
0
]
->
jumlah
_k
amar
-
$dataBookingBerakhir
[
0
]
->
jumlah_kamar
;
if
(
$currentJumlahKamar2
>=
$request
[
'jumlah_kamar'
]){
dd
(
'boleh aja agan'
);
}
else
{
...
...
@@ -251,7 +255,7 @@ class CustomerController extends Controller
}
$dataPelanggan
=
DB
::
table
(
'users'
)
->
join
(
'pelanggan'
,
'users.id'
,
'='
,
'pelanggan.id_
A
kun'
)
->
join
(
'pelanggan'
,
'users.id'
,
'='
,
'pelanggan.id_
a
kun'
)
->
select
(
'pelanggan.id'
,
'pelanggan.nama'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
...
...
@@ -320,7 +324,7 @@ class CustomerController extends Controller
$lb
->
save
();
Nexmo
::
message
()
->
send
([
'to'
=>
$dataPemilik
[
0
]
->
no
T
elepon
,
'to'
=>
$dataPemilik
[
0
]
->
no
_t
elepon
,
'from'
=>
'ASDASD'
,
'text'
=>
'Hi ini hanya sebuah test no more'
]);
...
...
app/Http/Controllers/GuestController.php
View file @
db6e70c2
...
...
@@ -41,7 +41,7 @@ class GuestController extends Controller
public
function
detailhomestay
(
$id
){
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
P
emilik'
,
'='
,
'pemilikhomestay.id'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
_p
emilik'
,
'='
,
'pemilikhomestay.id'
)
->
select
(
'pemilikhomestay.*'
,
'homestay.*'
)
->
where
(
'homestay.id'
,
'='
,
$id
)
->
get
();
...
...
@@ -59,14 +59,14 @@ class GuestController extends Controller
$avilableRoom
=
0
;
if
(
$dataJumlahKamar
->
count
()
==
null
){
$avilableRoom
=
$data
[
0
]
->
jumlah
K
amar
;
$avilableRoom
=
$data
[
0
]
->
jumlah
_k
amar
;
}
else
{
$avilableRoom
=
$dataJumlahKamar
[
0
]
->
jumlah_kamar
;
}
$dataKamar
=
DB
::
table
(
'kamar'
)
->
select
(
'kamar.*'
)
->
where
(
'kamar.id
H
omestay'
,
'='
,
$id
)
->
where
(
'kamar.id
_h
omestay'
,
'='
,
$id
)
->
get
();
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
])
->
with
(
'daftarBook'
,
$daftarBook
)
->
with
(
'dataKamar'
,
$dataKamar
)
->
with
(
'avilable'
,
$avilableRoom
);
...
...
app/Http/Controllers/OwnerController.php
View file @
db6e70c2
...
...
@@ -41,8 +41,8 @@ class OwnerController extends Controller
$owner
->
nama
=
$request
[
'nama'
];
$owner
->
alamat
=
$request
[
'alamat'
];
$owner
->
pekerjaan
=
$request
[
'pekerjaan'
];
$owner
->
no
T
elepon
=
$request
[
'noTelepon'
];
$owner
->
no
R
ekening
=
$request
[
'noRekening'
];
$owner
->
no
_t
elepon
=
$request
[
'noTelepon'
];
$owner
->
no
_r
ekening
=
$request
[
'noRekening'
];
if
(
$request
->
file
(
'picture'
)
==
null
){
$owner
->
foto
=
$owner
->
foto
;
...
...
@@ -79,13 +79,13 @@ class OwnerController extends Controller
public
function
feddback
(){
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pemilikhomestay.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataFeedback
=
DB
::
table
(
'feedback'
)
->
join
(
'pelanggan'
,
'feedback.id
P
elanggan'
,
'pelanggan.id'
)
->
join
(
'pelanggan'
,
'feedback.id
_p
elanggan'
,
'pelanggan.id'
)
->
select
(
'feedback.*'
,
'pelanggan.nama'
)
->
where
(
'feedback.id_pemilik
H
omestay'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
where
(
'feedback.id_pemilik
_h
omestay'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
return
view
(
'adminlte::layouts.owner.listfeedback'
)
->
with
(
'data'
,
$dataFeedback
);
...
...
@@ -107,7 +107,7 @@ class OwnerController extends Controller
$updateHomestay
=
Homestay
::
find
(
$id
);
$updateHomestay
->
nama
H
omestay
=
$request
[
'namaUpdate'
];
$updateHomestay
->
nama
_h
omestay
=
$request
[
'namaUpdate'
];
$updateHomestay
->
alamat
=
$request
[
'alamatUpdate'
];
$updateHomestay
->
harga
=
$request
[
'hargaUpdate'
];
...
...
@@ -135,12 +135,12 @@ class OwnerController extends Controller
public
function
update
(){
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pemilikhomestay.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.*'
)
->
where
(
'homestay.id
P
emilik'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
where
(
'homestay.id
_p
emilik'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
return
view
(
'adminlte::layouts.owner.UpdateHomestay'
)
->
with
(
'data'
,
$dataHomestay
[
0
]);
...
...
@@ -168,12 +168,12 @@ class OwnerController extends Controller
public
function
listOfBook
(){
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pemilikhomestay.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
P
emilik'
,
'pemilikhomestay.id'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
_p
emilik'
,
'pemilikhomestay.id'
)
->
select
(
'homestay.id'
)
->
where
(
'pemilikhomestay.id'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
...
...
@@ -272,16 +272,16 @@ class OwnerController extends Controller
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.*'
)
->
where
(
'pemilikhomestay.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pemilikhomestay.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
P
emilik'
,
'pemilikhomestay.id'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.id
H
omestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
_p
emilik'
,
'pemilikhomestay.id'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.id
_h
omestay'
)
->
select
(
'kamar.*'
)
->
where
(
'pemilikhomestay.id'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
//dd($data);
return
view
(
'adminlte::layouts.owner.listRoom'
)
->
with
(
'data'
,
$data
)
->
with
(
'count'
,
$data
->
count
());
}
...
...
@@ -290,15 +290,15 @@ class OwnerController extends Controller
$dataPel
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.*'
)
->
where
(
'pemilikhomestay.id_
A
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
where
(
'pemilikhomestay.id_
a
kun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
P
emilik'
,
'='
,
'pemilikhomestay.id'
)
->
join
(
'pemilikhomestay'
,
'homestay.id
_p
emilik'
,
'='
,
'pemilikhomestay.id'
)
->
join
(
'transaksi'
,
'homestay.id'
,
'='
,
'transaksi.id_homestay'
)
->
join
(
'pelanggan'
,
'transaksi.id_pelanggan'
,
'='
,
'pelanggan.id'
)
->
select
(
'transaksi.*'
,
'pelanggan.nama'
,
'pelanggan.alamat'
,
'pelanggan.no
T
elepon'
)
->
where
(
'homestay.id
P
emilik'
,
'='
,
$dataPel
[
0
]
->
id
)
->
select
(
'transaksi.*'
,
'pelanggan.nama'
,
'pelanggan.alamat'
,
'pelanggan.no
_t
elepon'
)
->
where
(
'homestay.id
_p
emilik'
,
'='
,
$dataPel
[
0
]
->
id
)
->
get
();
return
view
(
'adminlte::layouts.owner.listPesanan'
)
->
with
(
'data'
,
$data
)
->
with
(
'count'
,
$data
->
count
());
...
...
@@ -323,15 +323,15 @@ class OwnerController extends Controller
]);
$idPemilik
=
DB
::
table
(
'users'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
A
kun'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
a
kun'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$data
=
new
RequestFasilitas
();
$data
->
id_pemilik_homestay
=
$idPemilik
[
0
]
->
id
;
$data
->
id_kategoriFasiltas
=
$request
[
'id_kategori
F
asiltas'
];
$data
->
namaRequestFasilitas
=
$request
[
'namaRequest
F
asilitas'
];
$data
->
id_kategoriFasiltas
=
$request
[
'id_kategori
_f
asiltas'
];
$data
->
namaRequestFasilitas
=
$request
[
'namaRequest
_f
asilitas'
];
$data
->
deskripsi
=
$request
[
'deskripsi'
];
$data
->
jumlah
=
$request
[
'jumlah'
];
...
...
@@ -368,16 +368,16 @@ class OwnerController extends Controller
]);
$idPemilik
=
DB
::
table
(
'users'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
A
kun'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
a
kun'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$data
=
new
RequestHomestay
();
$data
->
id
PemilikH
omestay
=
$idPemilik
[
0
]
->
id
;
$data
->
nama
H
omestay
=
$request
[
'namaHomestay'
];
$data
->
jumlah
K
amar
=
$request
[
'jumlahKamar'
];
$data
->
id
_pemili_h
omestay
=
$idPemilik
[
0
]
->
id
;
$data
->
nama
_h
omestay
=
$request
[
'namaHomestay'
];
$data
->
jumlah
_k
amar
=
$request
[
'jumlahKamar'
];
$data
->
status
=
0
;
$data
->
save
();
...
...
@@ -389,15 +389,15 @@ class OwnerController extends Controller
public
function
listPengajuan
(){
$idPemilik
=
DB
::
table
(
'users'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
A
kun'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
a
kun'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$data
=
DB
::
table
(
'pengajuan_homestay'
)
->
join
(
'pemilikhomestay'
,
'pengajuan_homestay.id
PemilikH
omestay'
,
'='
,
'pemilikhomestay.id'
)
->
join
(
'pemilikhomestay'
,
'pengajuan_homestay.id
_pemilik_h
omestay'
,
'='
,
'pemilikhomestay.id'
)
->
select
(
'pemilikhomestay.nama'
,
'pengajuan_homestay.*'
)
->
where
(
'pengajuan_homestay.id
PemilikH
omestay'
,
'='
,
$idPemilik
[
0
]
->
id
)
->
where
(
'pengajuan_homestay.id
_pemilik_h
omestay'
,
'='
,
$idPemilik
[
0
]
->
id
)
->
get
();
$count
=
$data
->
count
();
...
...
@@ -408,7 +408,7 @@ class OwnerController extends Controller
//Melihat Daftar Pengajuan Fasilitas
public
function
listPengajuanFasilitas
(){
$idPemilik
=
DB
::
table
(
'users'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
A
kun'
)
->
join
(
'pemilikhomestay'
,
'users.id'
,
'='
,
'pemilikhomestay.id_
a
kun'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'users.id'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
...
...
app/Http/Middleware/Owner.php
View file @
db6e70c2
...
...
@@ -18,11 +18,11 @@ class Owner
{
if
(
Auth
::
check
()){
if
(
Auth
::
user
()
->
role
!=
'Owner'
){
dd
(
'masuk di midle ga
n'
);
redirect
(
'logi
n'
);
if
(
Auth
::
user
()
->
role
==
'Customer'
){
return
redirect
(
''
);
}
elseif
(
Auth
::
user
()
->
role
==
'DinasPariwisata'
){
return
redirect
(
'
/
'
);
return
redirect
(
'
admin
'
);
}
else
{
return
redirect
(
'owner'
);
}
...
...
resources/views/vendor/adminlte/layouts/admin/listPengajuan.blade.php
View file @
db6e70c2
...
...
@@ -46,8 +46,8 @@
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->nama
H
omestay}
}
</td>
<td>
{
{$a->jumlah
K
amar}
}
</td>
<td>
{
{$a->nama
_h
omestay}
}
</td>
<td>
{
{$a->jumlah
_k
amar}
}
</td>
@if(
$a->status
==1)
<td>Di Terima</td>
@elseif(
$a->status
==2)
...
...
resources/views/vendor/adminlte/layouts/admin/listRequestFasilitas.blade.php
View file @
db6e70c2
...
...
@@ -44,7 +44,7 @@
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->nama
RequestF
asilitas}
}
</td>
<td>
{
{$a->nama
_request_f
asilitas}
}
</td>
<td>
{
{$a->deskripsi}
}
</td>
<td>
{
{$a->jumlah}
}
</td>
<td>@if(
$a->gambar
==null)
...
...
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
db6e70c2
...
...
@@ -18,7 +18,7 @@
<tbody>
@foreach(
$data
as
$a
)
<tr class="
success
">
<td>
{
{$a->no
R
ekening}
}
</td>
<td>
{
{$a->no
_r
ekening}
}
</td>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->total_pembayaran}
}
</td>
<td>
...
...
resources/views/vendor/adminlte/layouts/customers/editprofiles.blade.php
View file @
db6e70c2
...
...
@@ -22,7 +22,7 @@
<div class="
form
-
group
">
<label for="
inputPassword3
" class="
col
-
sm
-
2
control
-
label
">No.Telepon</label>
<div class="
col
-
sm
-
10
">
<input type="
text
" name="
noTelepon
" class="
form
-
control
" id="
inputPassword3
" value="
{{
$data
->
no
T
elepon
}}
">
<input type="
text
" name="
noTelepon
" class="
form
-
control
" id="
inputPassword3
" value="
{{
$data
->
no
_t
elepon
}}
">
</div>
</div>
<div class="
form
-
group
">
...
...
resources/views/vendor/adminlte/layouts/owner/ListPengajuanFasilitas.blade.php
View file @
db6e70c2
...
...
@@ -46,7 +46,7 @@
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->nama
RequestF
asilitas}
}
</td>
<td>
{
{$a->nama
_request_f
asilitas}
}
</td>
<td>
{
{$a->deskripsi}
}
</td>
<td>
{
{$a->jumlah}
}
</td>
<td>
...
...
resources/views/vendor/adminlte/layouts/owner/ListPengajuanHomestay.blade.php
View file @
db6e70c2
...
...
@@ -42,8 +42,8 @@
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->nama
H
omestay}
}
</td>
<td>
{
{$a->jumlah
K
amar}
}
</td>
<td>
{
{$a->nama
_h
omestay}
}
</td>
<td>
{
{$a->jumlah
_k
amar}
}
</td>
<td>@if(
$a->status
==0) Sedang Menunggu
@elseif(
$a->status
==1) Diterima
@elseif(
$a->status
==2) Ditolak
...
...
resources/views/vendor/adminlte/layouts/owner/UpdateHomestay.blade.php
View file @
db6e70c2
...
...
@@ -37,7 +37,7 @@
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
bookmark
"></i>
</div>
<input type="
text
" class="
form
-
control
" placeholder="
Nama
Request
Fasilitas
" name="
namaUpdate
" value="
{{
$data
->
nama
H
omestay
}}
"/>
<input type="
text
" class="
form
-
control
" placeholder="
Nama
Request
Fasilitas
" name="
namaUpdate
" value="
{{
$data
->
nama
_h
omestay
}}
"/>
</div>
</div>
...
...
resources/views/vendor/adminlte/layouts/owner/listPesanan.blade.php
View file @
db6e70c2
...
...
@@ -54,7 +54,7 @@
<tr>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->alamat}
}
</td>
<td>
{
{$a->no
T
elepon}
}
</td>
<td>
{
{$a->no
_t
elepon}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
{
{$a->lama_menginap}
}
Hari</td>
...
...
resources/views/vendor/adminlte/layouts/owner/profil.blade.php
View file @
db6e70c2
...
...
@@ -37,12 +37,12 @@
<tr>
<th>No Telepon</th>
<td>: </td>
<td>
{
{$data->no
T
elepon}
}
</td>
<td>
{
{$data->no
_t
elepon}
}
</td>
</tr>
<tr>
<th>No Rekening </th>
<td>: </td>
<td>
{
{$data->no
R
ekening}
}
</td>
<td>
{
{$data->no
_r
ekening}
}
</td>
</tr>
</table>
</div>
...
...
resources/views/vendor/adminlte/layouts/owner/updateProfil.blade.php
View file @
db6e70c2
...
...
@@ -36,9 +36,9 @@
<label>Pekerjaan</label>
<input type="
text
" name="
pekerjaan
" value="
{{
$data
->
pekerjaan
}}
" id="
pekerjaan
" class="
form
-
control
">
<label>Nomor Telepon</label>
<input type="
text
" name="
noTelepon
" value="
{{
$data
->
no
T
elepon
}}
" id="
noTelepon
" class="
form
-
control
">
<input type="
text
" name="
noTelepon
" value="
{{
$data
->
no
_t
elepon
}}
" id="
noTelepon
" class="
form
-
control
">
<label>Nomor Rekening</label>
<input type="
text
" name="
noRekening
" value="
{{
$data
->
no
R
ekening
}}
" id="
noRekening
" class="
form
-
control
">
<input type="
text
" name="
noRekening
" value="
{{
$data
->
no
_r
ekening
}}
" id="
noRekening
" class="
form
-
control
">
<label>Foto</label>
<input type="
file
" name="
picture
" id="
picture
" class="
form
-
control
"><br>
<div class="
form
-
group
" align="
right
">
...
...
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
db6e70c2
...
...
@@ -5,7 +5,7 @@
<
div
class
="
banner
agileits
w3layouts
">
<img src="
{{
asset
(
'/img/'
.
$data
->
gambar
)}}
" alt="
Agileits
W3layouts
" style="
max
-
height
:
500
px
;
width
:
">
<h1 class="
wow
agileits
w3layouts
fadeInDown
">
{
{$data->nama
H
omestay}
}
</h1>
<h1 class="
wow
agileits
w3layouts
fadeInDown
">
{
{$data->nama
_h
omestay}
}
</h1>
</div>
<!-- //Banner -->
...
...
@@ -56,7 +56,7 @@
</div>
<!-- Booking -->
<div class="
details
agilets
w3layouts
" style="
margin
-
bottom
:
0
px
;
margin
-
top
:
0
px
;
">
<h2 > Daftar Booking di
{
{$data->nama
H
omestay}
}
</h2>
<h2 > Daftar Booking di
{
{$data->nama
_h
omestay}
}
</h2>
<div class="
container
">
<table class="
table
table
-
hover
" style="
background
-
color
:
white
;
margin
-
top
:
20
px
;
">
...
...
@@ -98,10 +98,10 @@
<h2 style="
margin
-
bottom
:
10
px
;
"> Info Pemilik </h2>
<ul style="
list
-
style
-
type
:
none
;
">
<li> Pemilik :
{
{$data->nama}
}
</li>
<li> No Telp :
{
{$data->no
T
elepon}
}
</li>
<li> No Telp :
{
{$data->no
_t
elepon}
}
</li>
<li> Alamat :
{
{$data->alamat}
}
</li>
<li> Pekerjaan :
{
{$data->pekerjaan}
}
</li>
<li> No Rekening :
{
{$data->no
R
ekening}
}
</li>
<li> No Rekening :
{
{$data->no
_r
ekening}
}
</li>
<li> Avilable Room :
{
{$avilable}
}
</li>
</ul>
</div>
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment