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
90c373d1
Commit
90c373d1
authored
May 22, 2017
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
merge
parents
1291e351
4f242463
Hide whitespace changes
Inline
Side-by-side
Showing
8 changed files
with
113 additions
and
12 deletions
+113
-12
Feedback.php
app/Feedback.php
+14
-0
CustomerController.php
app/Http/Controllers/CustomerController.php
+29
-0
OwnerController.php
app/Http/Controllers/OwnerController.php
+46
-1
download.jpg
public/img/download.jpg
+0
-0
UpdateHomestay.blade.php
...ws/vendor/adminlte/layouts/owner/UpdateHomestay.blade.php
+7
-6
Homestay.blade.php
...es/views/vendor/adminlte/layouts/pages/Homestay.blade.php
+4
-4
sidebar.blade.php
.../views/vendor/adminlte/layouts/partials/sidebar.blade.php
+4
-0
web.php
routes/web.php
+9
-1
No files found.
app/Feedback.php
0 → 100644
View file @
90c373d1
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Feedback
extends
Model
{
protected
$table
=
"feedback"
;
protected
$fillable
=
[
'id_pemilikHomestay'
,
'feedback'
,
'idPelanggan'
,
];
}
app/Http/Controllers/CustomerController.php
View file @
90c373d1
...
...
@@ -2,6 +2,7 @@
namespace
App\Http\Controllers
;
use
App\Feedback
;
use
App\Homestay
;
use
App\ListBook
;
use
App\Room
;
...
...
@@ -19,6 +20,34 @@ use Psy\Command\ListCommand\ConstantEnumerator;
class
CustomerController
extends
Controller
{
public
function
sendFeedback
(
Request
$request
,
$id
){
if
(
Auth
::
guest
()){
dd
(
"maaf nggak bisa banf"
);
}
$dataPelanggan
=
DB
::
table
(
'pelanggan'
)
->
select
(
'pelanggan.id'
)
->
where
(
'pelanggan.id_Akun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataPemilik
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.idPemilik'
)
->
where
(
'homestay.id'
,
'='
,
$id
)
->
get
();
//dd($dataPelanggan,$dataPemilik);
$feed
=
new
Feedback
();
$feed
->
id_pemilikHomestay
=
$dataPemilik
[
0
]
->
idPemilik
;
$feed
->
idPelanggan
=
$dataPelanggan
[
0
]
->
id
;
$feed
->
feedback
=
$request
[
'feedback'
];
$feed
->
save
();
return
redirect
()
->
action
(
'CustomerController@detailhomestay'
,
[
'id'
=>
$id
]);
//return redirect('detailhomestay/{id}',$id);
}
public
function
upload
(
Request
$request
,
$id
)
{
//dd("masuk agan");
...
...
app/Http/Controllers/OwnerController.php
View file @
90c373d1
...
...
@@ -2,6 +2,7 @@
namespace
App\Http\Controllers
;
use
App\Homestay
;
use
App\ListBook
;
use
App\RequestFasilitas
;
use
App\RequestHomestay
;
...
...
@@ -22,6 +23,50 @@ class OwnerController extends Controller
}
public
function
updateHomestay
(
Request
$request
,
$id
){
$updateHomestay
=
Homestay
::
find
(
$id
);
$updateHomestay
->
namaHomestay
=
$request
[
'namaUpdate'
];
$updateHomestay
->
alamat
=
$request
[
'alamatUpdate'
];
$updateHomestay
->
harga
=
$request
[
'hargaUpdate'
];
if
(
$updateHomestay
->
fasilitas
==
null
){
$updateHomestay
->
fasilitas
=
$updateHomestay
->
fasilitas
;
}
else
{
$updateHomestay
->
fasilitas
=
$request
[
'fasilitasUpdate'
];
}
if
(
$request
->
file
(
'gambar'
)
==
null
){
$updateHomestay
->
gambar
=
$updateHomestay
->
gambar
;
}
else
{
$file
=
$request
->
file
(
'gambar'
);
$fileName
=
$file
->
getClientOriginalName
();
$request
->
file
(
'gambar'
)
->
move
(
"img/"
,
$fileName
);
$updateHomestay
->
gambar
=
$fileName
;
}
$updateHomestay
->
update
();
return
redirect
(
'updateHomestay'
);
}
public
function
update
(){
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.id'
)
->
where
(
'pemilikhomestay.id_Akun'
,
'='
,
Auth
::
user
()
->
id
)
->
get
();
$dataHomestay
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.*'
)
->
where
(
'homestay.idPemilik'
,
'='
,
$dataPemilik
[
0
]
->
id
)
->
get
();
//dd($dataPemilik[0]->id,$dataHomestay[0]);
return
view
(
'adminlte::layouts.owner.UpdateHomestay'
)
->
with
(
'data'
,
$dataHomestay
[
0
]);
}
public
function
konfirmasiPemesanan
(
Request
$request
,
$id
){
$data
=
Transaksi
::
find
(
$id
);
...
...
@@ -101,7 +146,7 @@ class OwnerController extends Controller
$dataKamar
->
fasilitas
=
$request
[
'fasilitas'
];
if
(
$request
->
file
(
'foto'
)
==
null
){
$dataKamar
->
foto
=
$dataKamar
->
foto
;
$dataKamar
->
gambar
=
$dataKamar
->
gambar
;
}
else
{
$file
=
$request
->
file
(
'foto'
);
$fileName
=
$file
->
getClientOriginalName
();
...
...
public/img/download.jpg
0 → 100644
View file @
90c373d1
9.57 KB
resources/views/vendor/adminlte/layouts/owner/UpdateHomestay.blade.php
View file @
90c373d1
...
...
@@ -28,15 +28,16 @@
</div>
<div class="
box
-
body
">
<form action="
{{
url
(
'reqFasilitas'
)
}}
" method="
post
" enctype="
multipart
/
form
-
data
">
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<form action="
{{
url
(
'updateHomestay/'
.
$data
->
id
)
}}
" method="
post
" enctype="
multipart
/
form
-
data
">
<input type="
hidden
" name="
_method
" value="
PUT
">
{
{csrf_field()}
}
<div class="
form
-
group
">
<label> Nama Homestay </label>
<div class="
input
-
group
">
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
bookmark
"></i>
</div>
<input type="
text
" class="
form
-
control
" placeholder="
Nama
Request
Fasilitas
" name="
nama
RequestFasilitas
"/>
<input type="
text
" class="
form
-
control
" placeholder="
Nama
Request
Fasilitas
" name="
nama
Update
" value="
{{
$data
->
namaHomestay
}}
"/>
</div>
</div>
...
...
@@ -46,7 +47,7 @@
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
building
"></i>
</div>
<input type="
text
" class="
form
-
control
" placeholder="
Nama
Request
Fasilitas
" name="
namaRequestFasilitas
"/>
<input type="
text
" class="
form
-
control
" placeholder="
Nama
Request
Fasilitas
" name="
alamatUpdate
" value="
{{
$data
->
alamat
}}
"/>
</div>
</div>
...
...
@@ -56,7 +57,7 @@
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
dollar
"></i>
</div>
<input type="
text
" class="
form
-
control
"
placeholder="
Nama
Request
Fasilitas
" name="
namaRequestFasilitas
"/>
<input type="
text
" class="
form
-
control
"
value="
{{
$data
->
harga
}}
" placeholder="
Nama
Request
Fasilitas
" name="
hargaUpdate
"/>
</div>
</div>
...
...
@@ -66,7 +67,7 @@
<div class="
input
-
group
-
addon
">
<i class="
fa
fa
-
newspaper
-
o
"></i>
</div>
<textarea class="
form
-
control
"
placeholder="
Deskripsi
" name="
deskripsi
" style="
height
:
200
px
;
"> </textarea>
<textarea class="
form
-
control
"
value="
{{
$data
->
fasilitas
}}
" placeholder="
Deskripsi
" name="
fasilitasUpdate
" style="
height
:
200
px
;
"> </textarea>
</div>
</div>
...
...
resources/views/vendor/adminlte/layouts/pages/Homestay.blade.php
View file @
90c373d1
...
...
@@ -121,12 +121,12 @@
<div class="
container
">
<div class="
col
-
md
-
6
col
-
sm
-
6
agileits
w3layouts
contact
-
grid
contact
-
grid
-
2
wow
slideInLeft
">
<h2 style="
margin
-
bottom
:
10
px
;
">Feedback</h2>
<form action="
#" method="post" style="margin-bottom: 25px;"></form>
<form action="
{{
url
(
'feedback/'
.
$data
->
id
)}}
" method="
post
" style="
margin
-
bottom
:
25
px
;
">
<input type="
hidden
" name="
_token
" value="
{{
csrf_token
()
}}
">
<input type="
text
" class="
text
wow
agileits
w3layouts
slideInLeft
" name="
Name
" placeholder="
Name
" required="">
<textarea name="
Message
" class="
wow
agileits
w3layouts
slideInLeft
" placeholder="
Message
" required=""></textarea>
<textarea name="
feedback
" class="
wow
agileits
w3layouts
slideInLeft
" placeholder="
Message
" required=""></textarea>
<input type="
submit
" class="
more_btn
wow
agileits
w3layouts
slideInLeft
" value="
Kirim
Feedback
">
</button>
</form>
</form>
</div>
</div>
</div>
...
...
resources/views/vendor/adminlte/layouts/partials/sidebar.blade.php
View file @
90c373d1
...
...
@@ -54,8 +54,12 @@
<ul
class=
"treeview-menu"
style=
"display : none;"
>
<li><a
href=
"{{url('daftarKamar')}}"
><i
class=
'fa fa-list'
></i>
<span>
Daftar Kamar
</span></a></li>
<li><a
href=
"{{url('pengajuanHomestay')}}"
><i
class=
'fa fa-external-link-square'
></i>
<span>
Pengajuan Homestay
</span></a></li>
<
<<<<<<
HEAD
<
li
><a
href=
"{{url('UpdateHomestay')}}"
><i
class=
'fa fa-list'
></i>
<span>
Update Homestay
</span></a></li>
<li><a
href=
"{{url('ListFeedback')}}"
><i
class=
'fa fa-list'
></i>
<span>
Feedback
</span></a></li>
=======
<li><a
href=
"{{url('updateHomestay')}}"
><i
class=
'fa fa-list'
></i>
<span>
Update Homestay
</span></a></li>
>>>>>>> 4f242463e2642329a8a7e6496292cc4bbefd1897
</ul>
</li>
...
...
routes/web.php
View file @
90c373d1
...
...
@@ -55,6 +55,7 @@ Route::get('DataPemesanan', function(){
return
view
(
'adminlte::layouts.admin.dataPemesanan'
);
});
Route
::
post
(
'feedback/{id}'
,
'CustomerController@sendFeedback'
);
Route
::
get
(
'listPemesanan'
,
'AdminController@listPesanan'
);
Route
::
put
(
'editRoom/{id}'
,
'OwnerController@updateRoom'
);
Route
::
post
(
'addManual'
,
'OwnerController@addBookManual'
);
...
...
@@ -93,10 +94,17 @@ Route::put('listPengajuanHomestay/{id}','AdminController@AccPengajuanHomestay');
Route
::
resource
(
'profile'
,
'ProfileController'
);
Route
::
get
(
'reqFasilitas'
,
'OwnerController@requestFasilitas'
);
Route
::
post
(
'reqFasilitas'
,
'OwnerController@storeRequest'
);
Route
::
get
(
'updateHomestay'
,
'OwnerController@update'
);
Route
::
put
(
'updateHomestay/{id}'
,
'OwnerController@updateHomestay'
);
Route
::
get
(
'UpdateHomestay'
,
function
(){
/*Route::get('UpdateHomestay', function(){
return view('adminlte::layouts.owner.UpdateHomestay');
<<<<<<< HEAD
});
Route::get('ListFeedback', function(){
return view('adminlte::layouts.owner.listfeedback');
});
=======
});*/
>>>>>>>
4
f242463e2642329a8a7e6496292cc4bbefd1897
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