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
65128518
Commit
65128518
authored
May 23, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
571fff5a
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
25 additions
and
3 deletions
+25
-3
CustomerController.php
app/Http/Controllers/CustomerController.php
+19
-1
History.blade.php
...views/vendor/adminlte/layouts/customers/History.blade.php
+5
-1
web.php
routes/web.php
+1
-1
No files found.
app/Http/Controllers/CustomerController.php
View file @
65128518
...
@@ -22,6 +22,14 @@ class CustomerController extends Controller
...
@@ -22,6 +22,14 @@ class CustomerController extends Controller
public
function
cancelPemesanan
(
$id
){
public
function
cancelPemesanan
(
$id
){
$dataTrsaksi
=
Transaksi
::
find
(
$id
);
$dataTrsaksi
->
delete
();
DB
::
table
(
'daftar_book'
)
->
where
(
'id_transaksi'
,
'='
,
$id
)
->
delete
();
return
redirect
(
'customerHistory'
);
}
}
public
function
sendFeedback
(
Request
$request
,
$id
){
public
function
sendFeedback
(
Request
$request
,
$id
){
...
@@ -330,15 +338,25 @@ class CustomerController extends Controller
...
@@ -330,15 +338,25 @@ class CustomerController extends Controller
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$dataHomestay
[
0
]
->
harga
;
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$dataHomestay
[
0
]
->
harga
;
$trans
->
status
=
0
;
$trans
->
status
=
0
;
$trans
->
save
();
$dataTrans
=
DB
::
table
(
'transaksi'
)
->
select
(
'transaksi.id'
)
->
where
(
'transaksi.tanggal_mulai'
,
'='
,
$request
[
'tanggal'
])
->
where
(
'transaksi.tanggal_berakhir'
,
'='
,
$baru
)
->
get
();
//Insert Table Daftar Booking
//Insert Table Daftar Booking
$lb
->
homestay
=
$request
[
'id'
];
$lb
->
homestay
=
$request
[
'id'
];
$lb
->
id_transaksi
=
$dataTrans
[
0
]
->
id
;
$lb
->
nama_pemesan
=
$dataPelanggan
[
0
]
->
nama
;
$lb
->
nama_pemesan
=
$dataPelanggan
[
0
]
->
nama
;
$lb
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$lb
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$lb
->
tanggal_mulai
=
$request
[
'tanggal'
]
;
$lb
->
tanggal_mulai
=
$request
[
'tanggal'
]
;
$lb
->
tanggal_berakhir
=
$baru
;
$lb
->
tanggal_berakhir
=
$baru
;
//Save
//Save
$trans
->
save
();
$lb
->
save
();
$lb
->
save
();
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$request
[
'id'
]]);
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$request
[
'id'
]]);
...
...
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
65128518
...
@@ -38,7 +38,11 @@
...
@@ -38,7 +38,11 @@
<a href="
{{
url
(
'buktipembayaran/'
.
$a
->
id
)}}
">Upload Bukti</a>
<a href="
{{
url
(
'buktipembayaran/'
.
$a
->
id
)}}
">Upload Bukti</a>
</td>
</td>
<td>
<td>
<button type="
button
" class="
btn
btn
-
danger
" > Cancel </button>
<form action="
{{
url
(
'batalkanPemesanan/'
.
$a
->
id
)}}
" method="
POST
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
DELETE
">
<button type="
submit
" class="
btn
btn
-
danger
">Hapus</button>
</form>
</td>
</td>
</tr>
</tr>
@endforeach
@endforeach
...
...
routes/web.php
View file @
65128518
...
@@ -96,7 +96,7 @@ Route::get('reqFasilitas','OwnerController@requestFasilitas');
...
@@ -96,7 +96,7 @@ Route::get('reqFasilitas','OwnerController@requestFasilitas');
Route
::
post
(
'reqFasilitas'
,
'OwnerController@storeRequest'
);
Route
::
post
(
'reqFasilitas'
,
'OwnerController@storeRequest'
);
Route
::
get
(
'updateHomestay'
,
'OwnerController@update'
);
Route
::
get
(
'updateHomestay'
,
'OwnerController@update'
);
Route
::
put
(
'updateHomestay/{id}'
,
'OwnerController@updateHomestay'
);
Route
::
put
(
'updateHomestay/{id}'
,
'OwnerController@updateHomestay'
);
Route
::
delete
(
'batalkanPemesanan/{id}'
,
'CutomerController@cancelPemesanan'
);
Route
::
delete
(
'batalkanPemesanan/{id}'
,
'Cu
s
tomerController@cancelPemesanan'
);
/*Route::get('UpdateHomestay', function(){
/*Route::get('UpdateHomestay', function(){
...
...
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