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
7af4b3ef
Commit
7af4b3ef
authored
Jun 11, 2017
by
Juliper
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
no message
parent
a5f736df
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
30 additions
and
0 deletions
+30
-0
AdminController.php
app/Http/Controllers/AdminController.php
+6
-0
GuestController.php
app/Http/Controllers/GuestController.php
+1
-0
OwnerController.php
app/Http/Controllers/OwnerController.php
+11
-0
ListBooking.blade.php
...views/vendor/adminlte/layouts/owner/ListBooking.blade.php
+11
-0
web.php
routes/web.php
+1
-0
No files found.
app/Http/Controllers/AdminController.php
View file @
7af4b3ef
...
@@ -127,13 +127,19 @@ class AdminController extends Controller
...
@@ -127,13 +127,19 @@ class AdminController extends Controller
//Melakuan Aksi Untuk memproses Permintaan Admin
//Melakuan Aksi Untuk memproses Permintaan Admin
public
function
UpdateRequestFasilitass
(
$id
){
public
function
UpdateRequestFasilitass
(
$id
){
//$data = DB::table('requestfasilitas')->where('id', $id)->first();
//$data = DB::table('requestfasilitas')->where('id', $id)->first();
$RF
=
RequestFasilitas
::
find
(
$id
);
$RF
=
RequestFasilitas
::
find
(
$id
);
if
(
$RF
==
null
){
dd
(
'nggak boleh gan'
);
}
else
{
$RF
->
status
=
2
;
$RF
->
status
=
2
;
$RF
->
update
();
$RF
->
update
();
return
redirect
(
'requestFasilitas'
);
return
redirect
(
'requestFasilitas'
);
}
}
}
public
function
UpdateRequestFasilitas
(
$id
){
public
function
UpdateRequestFasilitas
(
$id
){
$RF
=
RequestFasilitas
::
find
(
$id
);
$RF
=
RequestFasilitas
::
find
(
$id
);
...
...
app/Http/Controllers/GuestController.php
View file @
7af4b3ef
...
@@ -76,6 +76,7 @@ class GuestController extends Controller
...
@@ -76,6 +76,7 @@ class GuestController extends Controller
$daftarBook
=
DB
::
table
(
'daftar_book'
)
$daftarBook
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$id
)
->
where
(
'daftar_book.homestay'
,
'='
,
$id
)
->
where
(
'daftar_book.status'
,
'='
,
1
)
->
get
();
->
get
();
$now
=
new
DateTime
();
$now
=
new
DateTime
();
...
...
app/Http/Controllers/OwnerController.php
View file @
7af4b3ef
...
@@ -59,6 +59,17 @@ class OwnerController extends Controller
...
@@ -59,6 +59,17 @@ class OwnerController extends Controller
return
view
(
'adminlte::layouts.owner.home'
)
->
with
(
'count'
,
$data
->
count
())
->
with
(
'count1'
,
$dataListOfBook
->
count
())
->
with
(
'count2'
,
$dataFeedback
->
count
());
return
view
(
'adminlte::layouts.owner.home'
)
->
with
(
'count'
,
$data
->
count
())
->
with
(
'count1'
,
$dataListOfBook
->
count
())
->
with
(
'count2'
,
$dataFeedback
->
count
());
}
}
public
function
Checkout
(
$id
){
$dataPesanan
=
ListBook
::
find
(
$id
);
$dataPesanan
->
status
=
0
;
$dataPesanan
->
update
();
return
redirect
(
'daftarBooking'
);
}
//Menyimpan Data untuk di update
//Menyimpan Data untuk di update
public
function
updateProfil
(
Request
$request
,
$id
){
public
function
updateProfil
(
Request
$request
,
$id
){
...
...
resources/views/vendor/adminlte/layouts/owner/ListBooking.blade.php
View file @
7af4b3ef
...
@@ -33,6 +33,7 @@
...
@@ -33,6 +33,7 @@
<th>Tanggal Mulai</th>
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Tanggal Berakhir</th>
<th>Jumlah Kamar</th>
<th>Jumlah Kamar</th>
<th></th>
</tr>
</tr>
@foreach(
$data
as
$a
)
@foreach(
$data
as
$a
)
<tr>
<tr>
...
@@ -40,6 +41,16 @@
...
@@ -40,6 +41,16 @@
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
<td>
{
{$a->jumlah_kamar}
}
</td>
<td>
@if(
$a->status
==0) Pengunjung sudah checkout
@else
<form action="
{{
url
(
'checkout/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
info
"><i class="
glyphicon
glyphicon
-
apple
"> Checkout</i></button>
</form>
@endif
</td>
</tr>
</tr>
@endforeach
@endforeach
</table>
</table>
...
...
routes/web.php
View file @
7af4b3ef
...
@@ -55,6 +55,7 @@ Route::get('DataPemesanan', function(){
...
@@ -55,6 +55,7 @@ Route::get('DataPemesanan', function(){
});
});
Route
::
group
([
'middleware'
=>
'owner'
],
function
()
{
Route
::
group
([
'middleware'
=>
'owner'
],
function
()
{
Route
::
put
(
'checkout/{id}'
,
'OwnerController@Checkout'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
Route
::
put
(
'konfirmasiPemesanan/{id}'
,
'OwnerController@konfirmasiPemesanan'
);
Route
::
put
(
'konfirmasiPemesanan/{id}'
,
'OwnerController@konfirmasiPemesanan'
);
...
...
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