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
9b958902
Commit
9b958902
authored
7 years ago
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
d2fc0500
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
91 deletions
+35
-91
CustomerController.php
app/Http/Controllers/CustomerController.php
+13
-18
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+22
-73
No files found.
app/Http/Controllers/CustomerController.php
View file @
9b958902
...
...
@@ -79,7 +79,13 @@ class CustomerController extends Controller
->
where
(
'homestay.id'
,
'='
,
$id
)
->
get
();
//dd($data);
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
]);
$daftarBook
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$id
)
->
get
();
return
view
(
'adminlte::layouts.pages.Homestay'
)
->
with
(
'data'
,
$data
[
0
])
->
with
(
'daftarBook'
,
$daftarBook
);
}
public
function
updateProfile
(
Request
$request
,
$id
){
...
...
@@ -140,27 +146,16 @@ class CustomerController extends Controller
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$data
[
0
]
->
harga
;
$lb
->
homestay
=
$request
[
'id'
];
$lb
->
nama_pemesan
=
$data2
[
0
]
->
nama
;
$lb
->
tanggal_mulai
=
$request
[
'tanggal'
]
;
$lb
->
tanggal_berakhir
=
$baru
;
$trans
->
save
();
$lb
->
save
();
// $dataTrans = DB::table('transaksi')
// ->select('transaksi.*')
// ->where('transaksi.id_pelanggan','=',$data2[0]->id)
// ->get();
//
// $room = Room::all()->where('idHomestay',$data[0]->idHomestay);
//
// for ($i=0;$i<=$request['jumlah_kamar'];$i++){
// if($room[$i]->id_transaksi==null){
// $upRoom = Room::find($room[$i]->id);
// $upRoom->id_transaksi = $dataTrans[0]->id;
// $upRoom->update();
// }
// }
dd
(
"masuk gan"
,
$request
[
'tanggal'
],
$time
,
$baru
,
$request
[
'id'
],
$data2
,
$data
);
return
redirect
(
'detailhomestay/'
,
$request
[
'id'
]);
}
}
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
9b958902
@
extends
(
'adminlte::layouts.master'
)
@
section
(
'main-content'
)
<!--
Banner
-->
<
div
class
="
banner
agileits
w3layouts
">
...
...
@@ -12,49 +13,24 @@
<div class="
container
">
<br><br>
<div class="
col
-
md
-
12
col
-
sm
-
12
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<form action="
{{
url
(
'book'
)}}
" method="
post
">
<<<<<<< HEAD
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker1
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
<form action="
{{
url
(
'book'
)}}
" method="
post
">
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
"
id="
datepicker2
" type="
text
" value="
Tanggal
out
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
<input class="
date
agileits
w3layouts
"
name="
tanggal
" id="
datepicker1
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
</div>
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_hari
" placeholder="
Lama
Menginap
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<a href="" id="
book
" >
<input type="
button
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</a>
</div>
</form>
=======
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
hidden
" name="
id
" value="
{{
$data
->
id
}}
">
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input class="
date
agileits
w3layouts
" id="
datepicker1
" name="
tanggal
" type="
text
" value="
Tanggal
Check
in
" onfocus="
this
.
value
=
''
;
" onblur="
if
(
this
.
value
==
''
)
{
this
.
value
=
''
;}
" required="">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_hari
" placeholder="
Lama
Menginap
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<div class="
col
-
md
-
2
col
-
sm
-
2
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
jumlah_kamar
" placeholder="
Jumlah
Kamar
" required="" style="
background
-
color
:
white
;
color
:
black
">
</div>
<div class="
col
-
md
-
3
col
-
sm
-
3
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</div>
</form>
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Book
Now
">
</form>
</div>
</div>
</div>
...
...
@@ -68,25 +44,19 @@
<table class="
table
table
-
striped
">
<thead>
<tr>
<th> No. </th>
<th> No. Rekening </th>
<th> Atas Nama </th>
<th> Total Pembayaran </th>
<th> Nama Pemesan </th>
<th> Tanggal Mulai </th>
<th> Tanggal Berakhir </th>
</tr>
</thead>
<tbody>
@foreach(
$daftarBook
as
$a
)
<tr>
<td>1</td>
<td>456141923</td>
<td>Palti Sinaga</td>
<td>2.400.000</td>
</tr>
<tr class="
success
">
<td>2</td>
<td>09179287213</td>
<td>Lestari Siregar</td>
<td>2.123.091</td>
<td>
{
{$a->nama_pemesan}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
</tr>
@endforeach
</tbody>
</table>
...
...
@@ -164,7 +134,6 @@
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran</h2>
<form action="
#" method="post" style="margin-bottom: 25px;"></form>
<<<<<<<
HEAD
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
...
...
@@ -174,26 +143,8 @@
</form>
</div>
</div>
=======
<h2 style="
margin
-
bottom
:
10
px
;
"> Kritik dan Saran </h2>
<form action ="
#" method="post" style="margin-bottom: 25px;"></form>
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
h2
style
=
"margin-bottom: 10px;"
>
Kritik
dan
Saran
</
h2
>
</
form
>
<
form
action
=
"#"
method
=
"post"
style
=
"margin-bottom: 25px;"
>
<
input
type
=
"text"
class
="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Email
" placeholder="
Email
" required="">
<textarea name="
Message
" class="
wow
agileits
w3layouts
slideInLeft
" placeholder="
Message
" required=""></textarea>
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Send
Message
">
</button>
</form>
<div>
</div>
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
</div>
<!-- //Tooltip-Content -->
...
...
@@ -201,12 +152,12 @@
<script>
$('#myModal').modal('');
</script>
<<<<<<< HEAD
<!-- Date-Picker-JavaScript -->
<script src="
{{
asset
(
'js/jquery-ui.js'
)}}
"></script>
@endsection
=======
<script>
document.getElementById('book').onclick = function(){
swal("
Good
job
!
", "
You
clicked
the
button
!
", "
success
");};
...
...
@@ -253,6 +204,4 @@
</div>
</div>
@endsection
>>>>>>> 70875f94bbc7d19947e16e1b35c430c4bceddcca
This diff is collapsed.
Click to expand it.
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