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
fec25c07
Commit
fec25c07
authored
May 22, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
94e74d1d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
25 additions
and
3 deletions
+25
-3
CustomerController.php
app/Http/Controllers/CustomerController.php
+23
-2
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+2
-1
No files found.
app/Http/Controllers/CustomerController.php
View file @
fec25c07
...
...
@@ -157,13 +157,34 @@ class CustomerController extends Controller
->
select
(
'pemilikhomestay.*'
,
'homestay.*'
)
->
where
(
'homestay.id'
,
'='
,
$id
)
->
get
();
//dd($data);
$daftarBook
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$id
)
->
get
();
$now
=
new
DateTime
();
$nowCurrent
=
$now
->
format
(
'Y-m-d'
);
//dd($nowCurrent);
$dataJumlahKamar
=
ListBook
::
all
()
->
where
(
'tanggal_mulai'
,
$nowCurrent
);
/*DB::table('daftar_book')
->select('daftar_book.jumlah_kamar')
->where('daftar_book.tanggal_mulai','=',$nowCurrent)
->get();*/
// dd($data);
$avilableRoom
=
0
;
if
(
$dataJumlahKamar
->
count
()
==
null
){
//dd('disini aja');
$avilableRoom
=
$data
[
0
]
->
jumlahKamar
;
}
else
{
//dd($dataJumlahKamar);
$avilableRoom
=
$dataJumlahKamar
[
0
]
->
jumlah_kamar
;
}
$dataKamar
=
DB
::
table
(
'kamar'
)
->
select
(
'kamar.*'
)
->
where
(
'kamar.idHomestay'
,
'='
,
$id
)
...
...
@@ -171,7 +192,7 @@ class CustomerController extends Controller
//dd("masuk agan",$id,$dataKamar);
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
])
->
with
(
'daftarBook'
,
$daftarBook
)
->
with
(
'dataKamar'
,
$dataKamar
);
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
])
->
with
(
'daftarBook'
,
$daftarBook
)
->
with
(
'dataKamar'
,
$dataKamar
)
->
with
(
'avilable'
,
$avilableRoom
)
;
}
public
function
updateProfile
(
Request
$request
,
$id
){
...
...
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
fec25c07
...
...
@@ -89,10 +89,11 @@
<li> Alamat :
{
{$data->alamat}
}
</li>
<li> Pekerjaan :
{
{$data->pekerjaan}
}
</li>
<li> No Rekening :
{
{$data->noRekening}
}
</li>
<li> Avilable Room :
{
{$avilable}
}
</li>
</ul>
</div>
<div class="
col
-
md
-
6
col
-
sm
-
6
cuisines
-
grids
agileits
w3layouts
cuisines
-
grids
-
2
wow
slideInRight
">
<img src="
{{
asset
(
'img/project-1.jpg'
)
}}
" alt="
Agileits
W3layouts
">
<img src="
/
img
/
{{
$data
->
gambar
}}
" alt="
Agileits
W3layouts
">
</div>
<!-- <div class="
clearfix
"></div> -->
<div class="
col
-
md
-
12
col
-
sm
-
12
gallery
-
grids
agileits
w3layouts
gallery
-
grids1
wow
slideInLeft
animated
">
...
...
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