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
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
33 additions
and
3 deletions
+33
-3
AdminController.php
app/Http/Controllers/AdminController.php
+9
-3
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,12 +127,18 @@ class AdminController extends Controller
//Melakuan Aksi Untuk memproses Permintaan Admin
public
function
UpdateRequestFasilitass
(
$id
){
//$data = DB::table('requestfasilitas')->where('id', $id)->first();
$RF
=
RequestFasilitas
::
find
(
$id
);
$RF
->
status
=
2
;
$RF
->
update
();
if
(
$RF
==
null
){
dd
(
'nggak boleh gan'
);
}
else
{
$RF
->
status
=
2
;
return
redirect
(
'requestFasilitas'
);
$RF
->
update
();
return
redirect
(
'requestFasilitas'
);
}
}
public
function
UpdateRequestFasilitas
(
$id
){
...
...
app/Http/Controllers/GuestController.php
View file @
7af4b3ef
...
...
@@ -76,6 +76,7 @@ class GuestController extends Controller
$daftarBook
=
DB
::
table
(
'daftar_book'
)
->
select
(
'daftar_book.*'
)
->
where
(
'daftar_book.homestay'
,
'='
,
$id
)
->
where
(
'daftar_book.status'
,
'='
,
1
)
->
get
();
$now
=
new
DateTime
();
...
...
app/Http/Controllers/OwnerController.php
View file @
7af4b3ef
...
...
@@ -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
());
}
public
function
Checkout
(
$id
){
$dataPesanan
=
ListBook
::
find
(
$id
);
$dataPesanan
->
status
=
0
;
$dataPesanan
->
update
();
return
redirect
(
'daftarBooking'
);
}
//Menyimpan Data untuk di update
public
function
updateProfil
(
Request
$request
,
$id
){
...
...
resources/views/vendor/adminlte/layouts/owner/ListBooking.blade.php
View file @
7af4b3ef
...
...
@@ -33,6 +33,7 @@
<th>Tanggal Mulai</th>
<th>Tanggal Berakhir</th>
<th>Jumlah Kamar</th>
<th></th>
</tr>
@foreach(
$data
as
$a
)
<tr>
...
...
@@ -40,6 +41,16 @@
<td>
{
{$a->tanggal_mulai}
}
</td>
<td>
{
{$a->tanggal_berakhir}
}
</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>
@endforeach
</table>
...
...
routes/web.php
View file @
7af4b3ef
...
...
@@ -55,6 +55,7 @@ Route::get('DataPemesanan', function(){
});
Route
::
group
([
'middleware'
=>
'owner'
],
function
()
{
Route
::
put
(
'checkout/{id}'
,
'OwnerController@Checkout'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
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