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
ed9f16f6
Commit
ed9f16f6
authored
Jun 11, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
H-2 lagi
parents
d5b22270
68ed2296
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 @
ed9f16f6
...
@@ -127,12 +127,18 @@ class AdminController extends Controller
...
@@ -127,12 +127,18 @@ 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
);
$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
){
public
function
UpdateRequestFasilitas
(
$id
){
...
...
app/Http/Controllers/GuestController.php
View file @
ed9f16f6
...
@@ -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 @
ed9f16f6
...
@@ -73,6 +73,17 @@ class OwnerController extends Controller
...
@@ -73,6 +73,17 @@ class OwnerController extends Controller
// return view('adminlte::layouts.owner.listPesanan')->with('count',$data->count())->with('count1',$dataListOfBook->count())->with('count2',$dataFeedback->count())->with('dataF',$dataFeedback);
// return view('adminlte::layouts.owner.listPesanan')->with('count',$data->count())->with('count1',$dataListOfBook->count())->with('count2',$dataFeedback->count())->with('dataF',$dataFeedback);
}
}
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 @
ed9f16f6
...
@@ -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 @
ed9f16f6
...
@@ -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