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
54b1e62b
Commit
54b1e62b
authored
7 years ago
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.del.ac.id/juliper19/pa2d4ti06
parents
1fdf0c33
835f365f
master
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
10 additions
and
5 deletions
+10
-5
CustomerController.php
app/Http/Controllers/CustomerController.php
+7
-5
anonymous1.jpg
public/img/anonymous1.jpg
+0
-0
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+2
-0
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/CustomerController.php
View file @
54b1e62b
...
...
@@ -173,10 +173,12 @@ class CustomerController extends Controller
$data
=
DB
::
table
(
'homestay'
)
->
join
(
'kamar'
,
'homestay.id'
,
'='
,
'kamar.idHomestay'
)
->
select
(
'kamar.*'
,
'homestay.harga'
)
->
select
(
'kamar.*'
,
'homestay.harga'
,
'homestay.'
)
->
where
(
'homestay.id'
,
'='
,
$request
[
'id'
])
->
get
();
dd
(
$data
);
$data2
=
DB
::
table
(
'users'
)
->
join
(
'pelanggan'
,
'users.id'
,
'='
,
'pelanggan.id_Akun'
)
->
select
(
'pelanggan.id'
,
'pelanggan.nama'
)
...
...
@@ -188,6 +190,7 @@ class CustomerController extends Controller
$baru
=
join
(
'-'
,
$time
);
//Insert Table Transaksi
$trans
=
new
Transaksi
();
$trans
->
id_pelanggan
=
$data2
[
0
]
->
id
;
$trans
->
id_homestay
=
$request
[
'id'
];
...
...
@@ -197,19 +200,18 @@ class CustomerController extends Controller
$trans
->
lama_menginap
=
$request
[
'jumlah_hari'
];
$trans
->
total_pembayaran
=
$request
[
'jumlah_kamar'
]
*
$data
[
0
]
->
harga
;
//Insert Table Daftar Booking
$lb
->
homestay
=
$request
[
'id'
];
$lb
->
nama_pemesan
=
$data2
[
0
]
->
nama
;
$lb
->
jumlah_kamar
=
$request
[
'jumlah_kamar'
];
$lb
->
tanggal_mulai
=
$request
[
'tanggal'
]
;
$lb
->
tanggal_berakhir
=
$baru
;
//Save
$trans
->
save
();
$lb
->
save
();
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$request
[
'id'
]]
);
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$request
[
'id'
]]);
}
...
...
This diff is collapsed.
Click to expand it.
public/img/anonymous1.jpg
0 → 100644
View file @
54b1e62b
12.2 KB
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
54b1e62b
...
...
@@ -50,6 +50,7 @@
<th> Nama Pemesan </th>
<th> Tanggal Mulai </th>
<th> Tanggal Berakhir </th>
<th> Jumlah Kamar</th>
</tr>
</thead>
<tbody>
...
...
@@ -58,6 +59,7 @@
<td>
{
{$a->nama_pemesan}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
</tr>
@endforeach
</tbody>
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
54b1e62b
...
...
@@ -55,6 +55,7 @@ Route::get('DataPemesanan', function(){
Route
::
get
(
'listPemesanan'
,
'AdminController@listPesanan'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
get
(
'editRoom/{id}'
,
'OwnerController@editRoom'
);
Route
::
get
(
'daftarKamar'
,
'OwnerController@daftarKamar'
);
Route
::
get
(
'pesanan'
,
'OwnerController@listTransaction'
);
...
...
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