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
0d4ce676
Commit
0d4ce676
authored
May 15, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pembayaran
parent
ee014bec
Show whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
87 additions
and
19 deletions
+87
-19
Homestay.php
app/Homestay.php
+1
-1
AdminController.php
app/Http/Controllers/AdminController.php
+1
-1
CustomerController.php
app/Http/Controllers/CustomerController.php
+33
-2
History.blade.php
...views/vendor/adminlte/layouts/customers/History.blade.php
+17
-11
Upload.blade.php
.../views/vendor/adminlte/layouts/customers/Upload.blade.php
+24
-0
editprofiles.blade.php
.../vendor/adminlte/layouts/customers/editprofiles.blade.php
+3
-0
mainheader.blade.php
...s/vendor/adminlte/layouts/partialweb/mainheader.blade.php
+5
-1
web.php
routes/web.php
+3
-3
No files found.
app/Homestay.php
View file @
0d4ce676
...
...
@@ -9,7 +9,7 @@ class Homestay extends Model
protected
$table
=
"homestay"
;
protected
$fillable
=
[
'idPemilik'
,
'nama'
,
'owner'
,
'alamat'
,
'jumlahKamar'
,
'harga'
,
'status'
,
'idPemilik'
,
'nama
Homestay
'
,
'owner'
,
'alamat'
,
'jumlahKamar'
,
'harga'
,
'status'
,
];
}
app/Http/Controllers/AdminController.php
View file @
0d4ce676
...
...
@@ -127,7 +127,7 @@ class AdminController extends Controller
$hs
=
new
Homestay
();
$hs
->
idPemilik
=
$RH
->
idPemilikHomestay
;
$hs
->
nama
=
$RH
->
namaHomestay
;
$hs
->
nama
Homestay
=
$RH
->
namaHomestay
;
$hs
->
owner
=
$data
[
0
]
->
nama
;
$hs
->
alamat
=
$data
[
0
]
->
alamat
;
$hs
->
jumlahKamar
=
$RH
->
jumlahKamar
;
...
...
app/Http/Controllers/CustomerController.php
View file @
0d4ce676
...
...
@@ -19,9 +19,39 @@ use Psy\Command\ListCommand\ConstantEnumerator;
class
CustomerController
extends
Controller
{
public
function
hitory
(
$id
){
public
function
upload
(
Request
$request
,
$id
){
$data
=
Transaksi
::
find
(
$id
);
return
view
(
'adminlte::layouts.customers.History'
);
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$request
[
'id'
]]
);
}
public
function
bukti
(
$id
){
$data
=
Transaksi
::
find
(
$id
);
return
view
(
'adminlte::layouts.customers.Upload'
)
->
with
(
'data'
,
$data
);
}
public
function
history
(){
$data
=
DB
::
table
(
'pelanggan'
)
->
select
(
'pelanggan.*'
)
->
where
(
'pelanggan.id_Akun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataTrans
=
DB
::
table
(
'homestay'
)
->
join
(
'transaksi'
,
'homestay.id'
,
'='
,
'transaksi.id_homestay'
)
->
join
(
'pemilikhomestay'
,
'homestay.idPemilik'
,
'='
,
'pemilikhomestay.id'
)
->
select
(
'transaksi.*'
,
'pemilikhomestay.nama'
,
'pemilikhomestay.noRekening'
)
->
where
(
'transaksi.id_pelanggan'
,
'='
,
$data
[
0
]
->
id
)
->
get
();
//dd("masuk agan",Auth::user()->id,$data[0]->id,$dataTrans);
return
view
(
'adminlte::layouts.customers.History'
)
->
with
(
'data'
,
$dataTrans
);
}
public
function
profile
(){
...
...
@@ -146,6 +176,7 @@ class CustomerController extends Controller
$trans
=
new
Transaksi
();
$trans
->
id_pelanggan
=
$data2
[
0
]
->
id
;
$trans
->
id_homestay
=
$request
[
'id'
];
$trans
->
tanggal_mulai
=
$request
[
'tanggal'
];
$trans
->
tanggal_berakhir
=
$baru
;
$trans
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
...
...
resources/views/vendor/adminlte/layouts/customers/History.blade.php
View file @
0d4ce676
...
...
@@ -6,25 +6,31 @@
<table class="
table
table
-
striped
">
<thead>
<tr>
<th> No. </th>
<th> No. Rekening </th>
<th> Atas Nama </th>
<th> Total Pembayaran </th>
<th> Bukti Pembayaran </th>
<th> Unggah Pembayaran </th>
</tr>
</thead>
<tbody>
<tr>
<td>1</td>
<td>456141923</td>
<td>Palti Sinaga</td>
<td>2.400.000</td>
</tr>
@foreach(
$data
as
$a
)
<tr class="
success
">
<td>2</td>
<td>09179287213</td>
<td>Lestari Siregar</td>
<td>2.123.091</td>
<td>
{
{$a->noRekening}
}
</td>
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->total_pembayaran}
}
</td>
<td>
@if(
$a->bukti_pembayaran
==null)
<img alt="
Buku
Transfer
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
(
'buktipembayaran/'
.
$a
->
id
)}}
">Upload Bukti</a>
</td>
</tr>
@endforeach
</tbody>
</table>
...
...
resources/views/vendor/adminlte/layouts/customers/Upload.blade.php
0 → 100644
View file @
0d4ce676
@
extends
(
'adminlte::layouts.master'
)
@
section
(
'main-content'
)
<
div
class
="
cuisines
agileits
w3layouts
" style="
padding
-
top
:
50
px
;
margin
-
top
:
80
px
;
margin
-
bottom
:
100
px
;
">
<div class="
container
">
<form class="
form
-
horizontal
" action="
{{
url
(
''
)}}
" method="
post
" enctype="
multipart
/
form
-
data
">
<input type="
hidden
" name="
_method
" value="
PUT
">
{
{csrf_field()}
}
<label>Tanggal Mulai</label>
<input type="
text
" name="
tanggal_mulai
" value="
{{
$data
->
tanggal_mulai
}}
" id="
noTelepon
" class="
form
-
control
">
<label>Tanggal Berakhir</label>
<input type="
text
" name="
tanggal_berakhir
" value="
{{
$data
->
tanggal_berakhir
}}
" class="
form
-
control
">
<label>Jumlah Kamar</label>
<input type="
text
" name="
jumlah_kamar
" value="
{{
$data
->
jumlah_kamar
}}
" class="
form
-
control
">
<label>Bukti Pembayaran</label>
<input type="
file
" name="
picture
" id="
picture
" class="
form
-
control
"><br>
<div class="
form
-
group
" align="
right
">
<input type="
submit
" class="
btn
btn
-
primary
" value="
simpan
">
</div>
</form>
</div>
</div>
@endsection
\ No newline at end of file
resources/views/vendor/adminlte/layouts/customers/editprofiles.blade.php
View file @
0d4ce676
...
...
@@ -42,9 +42,11 @@
<input type="
submit
" class="
btn
btn
-
primary
">
</div>
</div>
</div>
</form>
</div>
</div>
</div>
@endsection
\ No newline at end of file
resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php
View file @
0d4ce676
...
...
@@ -43,7 +43,7 @@
<li
class=
"user-header"
>
{{--
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"img-circle"
alt=
"User Image"
/>
--}}
<p>
<img
src=
"img/{{ Auth::user()->foto }}"
class=
"img-circle"
alt=
"User Image"
/>
<img
src=
"
/
img/{{ Auth::user()->foto }}"
class=
"img-circle"
alt=
"User Image"
/>
</p>
</li>
...
...
@@ -55,6 +55,10 @@
<a
href=
"{{ url('customerProfile') }}"
class=
"btn btn-default btn-flat"
>
{{ trans('adminlte_lang::message.profile') }}
</a>
</div>
<div
class=
"pull-left"
style=
"margin-left: 20px"
>
<a
href=
"{{ url('customerHistory') }}"
class=
"btn btn-default btn-flat"
>
History
</a>
</div>
<div
class=
"pull-right"
>
<a
href=
"{{ url('/logout') }}"
class=
"btn btn-default btn-flat"
onclick=
"event.preventDefault();
...
...
routes/web.php
View file @
0d4ce676
...
...
@@ -45,13 +45,13 @@ Route::group(['middleware' => 'auth'], function () {
//Please do not remove this if you want adminlte:route and adminlte:link commands to works correctly.
#adminlte_routes
});
Route
::
put
(
'upload/{id}'
,
'CustomerController@upload'
);
Route
::
get
(
'detailhomestay/{id}'
,
'CustomerController@detailhomestay'
);
Route
::
get
(
'
history/{id}'
,
'CustomerController@hi
tory'
);
Route
::
get
(
'
customerHistory'
,
'CustomerController@his
tory'
);
Route
::
get
(
'daftar'
,
'CustomerController@register'
);
Route
::
post
(
'daftar'
,
'CustomerController@registerStore'
);
Route
::
post
(
'book'
,
'CustomerController@booking'
);
//Route::post('editProfileCustomer/{id}','CustomerController@update');
//Route::put('editProfile/{id}','CustomerController@updateProfile');
Route
::
get
(
'buktipembayaran/{id}'
,
'CustomerController@bukti'
);
Route
::
get
(
'editProfileCustomer/{id}'
,
'CustomerController@editProfile'
);
Route
::
put
(
'editProfileCustomer/{id}'
,
'CustomerController@updateProfile'
);
Route
::
resource
(
'admin'
,
'AdminController'
);
...
...
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