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
16c62102
Commit
16c62102
authored
Jun 14, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
H-1
parents
128e04ec
eb6c3919
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
94 additions
and
0 deletions
+94
-0
AdminController.php
app/Http/Controllers/AdminController.php
+30
-0
GuestController.php
app/Http/Controllers/GuestController.php
+1
-0
Pemesanan.blade.php
...s/views/vendor/adminlte/layouts/admin/Pemesanan.blade.php
+55
-0
dataPemesanan.blade.php
...ews/vendor/adminlte/layouts/admin/dataPemesanan.blade.php
+7
-0
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/AdminController.php
View file @
16c62102
...
...
@@ -52,6 +52,36 @@ class AdminController extends Controller
->
get
();
return
view
(
'adminlte::layouts.admin.listhomestay'
)
->
with
(
'data'
,
$data
);
public
function
cariPesanan
(
Request
$request
){
$dataHomestay
=
Homestay
::
where
(
'nama_homestay'
,
$request
[
'nama_homestay'
])
->
get
();
//dd($dataHomestay[0]->id);
//$dataBok = DB::table('daftar_book')
// ->where('da');
$data
=
DB
::
table
(
'daftar_book'
)
->
join
(
'transaksi'
,
'daftar_book.id_transaksi'
,
'='
,
'transaksi.id'
)
->
join
(
'homestay'
,
'daftar_book.homestay'
,
'='
,
'homestay.id'
)
->
join
(
'pelanggan'
,
'transaksi.id_pelanggan'
,
'='
,
'pelanggan.id'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$dataHomestay
[
0
]
->
id
)
->
whereMonth
(
'daftar_book.tanggal_mulai'
,
'='
,
$request
[
'bulan'
])
->
where
(
'transaksi.status'
,
'='
,
1
)
->
select
(
'homestay.nama_homestay'
,
'homestay.owner'
,
'pelanggan.nama'
,
'transaksi.total_pembayaran'
,
'transaksi.jumlah_kamar'
,
'daftar_book.*'
)
->
get
();
//$i=0;
$penghasilan
=
0
;
foreach
(
$data
as
$a
){
$penghasilan
+=
$a
->
total_pembayaran
;
//$i++;
}
dd
(
$data
,
$penghasilan
);
dd
(
'masuk'
,
$request
[
'bulan'
],
$request
[
'nama_homestay'
],
$data
);
return
view
(
''
);
}
public
function
Allfeedback
(){
...
...
app/Http/Controllers/GuestController.php
View file @
16c62102
...
...
@@ -78,6 +78,7 @@ class GuestController extends Controller
$ts
=
explode
(
'-'
,
$request
[
'tanggal_selesai'
]);
$counter
=
0
;
$j
=
0
;
//Mencocokkan data pesanan untuk mendapat current room avilable
foreach
(
$dataBook
as
$db
){
...
...
resources/views/vendor/adminlte/layouts/admin/Pemesanan.blade.php
0 → 100644
View file @
16c62102
@
extends
(
'adminlte::layouts.app'
)
@
section
(
'htmlheader_title'
)
{{
trans
(
'adminlte_lang::message.home'
)
}}
@
endsection
@
section
(
'main-content'
)
<
div
class
="
box
box
-
warning
">
<div class="
box
-
header
with
-
border
">
<h3 class="
box
-
title
"> DATA PEMESANAN </h3>
@if (count(
$errors
) > 0)
<div class="
alert
alert
-
danger
">
<strong>Whoops!</strong> {{ trans('adminlte_lang::message.someproblems') }}<br><br>
<ul>
@foreach (
$errors->all
() as
$error
)
<li>{{
$error
}}</li>
@endforeach
</ul>
</div>
@endif
</div>
<div class="
box
-
body
">
<form action="
{{
url
(
'caripesanan'
)}}
">
<label>Bulan</label>
<input type="
number
" min="
1
" max="
12
" name="
bulan
">
<label>Nama Homestay</label>
<input type="
text
" name="
nama_homestay
">
<input type="
submit
" value="
Cari
">
</form>
<table class="
table
table
-
striped
">
<tr>
<th>Nama Homestay</th>
<th>Nama Pemilik Homstay</th>
<th>Nama Pemesan</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Jumlah Kamar yang dipesan</th>
</tr>
@foreach(
$data
as
$a
)
<tr>
<td>
{
{$a->nama_homestay}
}
</td>
<td>
{
{$a->owner}
}
</td>
<td>
{
{$a->nama_pemesan}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
</tr>
@endforeach
</table>
{!!
$data->render
() !!}
</div>
</div>
@endsection
resources/views/vendor/adminlte/layouts/admin/dataPemesanan.blade.php
View file @
16c62102
...
...
@@ -20,6 +20,13 @@
@endif
</div>
<div class="
box
-
body
">
<form action="
{{
url
(
'caripesanan'
)}}
">
<label>Bulan</label>
<input type="
number
" min="
1
" max="
12
" name="
bulan
">
<label>Nama Homestay</label>
<input type="
text
" name="
nama_homestay
">
<input type="
submit
" value="
Cari
">
</form>
<table class="
table
table
-
striped
">
<tr>
<th>Nama Homestay</th>
...
...
routes/web.php
View file @
16c62102
...
...
@@ -115,6 +115,7 @@ Route::group(['middleware' => 'customer'], function () {
Route
::
group
([
'middleware'
=>
'dinaspariwisata'
],
function
()
{
Route
::
get
(
'caripesanan'
,
'AdminController@cariPesanan'
);
Route
::
resource
(
'admin'
,
'AdminController'
);
Route
::
put
(
'updateOwner/{id}'
,
'AdminController@updateOwner'
);
Route
::
get
(
'ownerr/{id}'
,
'AdminController@owner'
);
...
...
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