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
849bd2de
Commit
849bd2de
authored
7 years ago
by
Palti Sinaga
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' of
https://gitlab.del.ac.id/juliper19/pa2d4ti06
parents
637d49cd
d7a28e19
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
64 additions
and
16 deletions
+64
-16
OwnerController.php
app/Http/Controllers/OwnerController.php
+55
-0
ProfileController.php
app/Http/Controllers/ProfileController.php
+1
-11
profiles.blade.php
...iews/vendor/adminlte/layouts/customers/profiles.blade.php
+1
-1
profil.blade.php
...rces/views/vendor/adminlte/layouts/owner/profil.blade.php
+1
-1
updateProfil.blade.php
...iews/vendor/adminlte/layouts/owner/updateProfil.blade.php
+1
-1
mainheader.blade.php
...ews/vendor/adminlte/layouts/partials/mainheader.blade.php
+1
-1
web.php
routes/web.php
+4
-1
No files found.
app/Http/Controllers/OwnerController.php
View file @
849bd2de
...
...
@@ -22,6 +22,61 @@ class OwnerController extends Controller
return
view
(
'adminlte::layouts.owner.home'
);
}
public
function
updateProfil
(
Request
$request
,
$id
){
$owner
=
Owner
::
where
(
'id'
,
$id
)
->
first
();
$user
=
User
::
where
(
'name'
,
$owner
->
nama
)
->
first
();
//dd("masuk agan",$id,$request['picture'],$request['nama']);
if
(
$request
[
'nama'
]
==
""
){
$user
->
name
=
$owner
->
nama
;
}
else
{
$user
->
name
=
$request
[
'nama'
];
}
$owner
->
nama
=
$request
[
'nama'
];
$owner
->
alamat
=
$request
[
'alamat'
];
$owner
->
pekerjaan
=
$request
[
'pekerjaan'
];
$owner
->
noTelepon
=
$request
[
'noTelepon'
];
$owner
->
noRekening
=
$request
[
'noRekening'
];
if
(
$request
->
file
(
'picture'
)
==
null
){
$owner
->
foto
=
$owner
->
foto
;
}
else
{
$file
=
$request
->
file
(
'picture'
);
$fileName
=
$file
->
getClientOriginalName
();
$request
->
file
(
'picture'
)
->
move
(
"img/"
,
$fileName
);
$owner
->
foto
=
$fileName
;
}
$user
->
update
();
$owner
->
update
();
//$data = DB::table('pemilikhomestay')->where('nama', $request['nama'])->first();
//dd('succes Gan');
return
redirect
(
'profile'
);
}
public
function
profileEdit
(
$id
){
$data
=
Owner
::
find
(
$id
);
//all()->where('id_Owner',$id);
//dd($data);
return
view
(
'adminlte::layouts.owner.updateProfil'
)
->
with
(
'data'
,
$data
);
}
public
function
profile
(){
$users
=
User
::
find
(
Auth
::
user
()
->
id
);
//dd($users->name);
//$data = Owner::where('nama',$users->name);
$data
=
DB
::
table
(
'pemilikhomestay'
)
->
where
(
'nama'
,
$users
->
name
)
->
first
();
//dd($data);
return
view
(
'adminlte::layouts.owner.profil'
)
->
with
(
'data'
,
$data
);
}
public
function
feddback
(){
$dataPemilik
=
DB
::
table
(
'pemilikhomestay'
)
->
select
(
'pemilikhomestay.id'
)
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/ProfileController.php
View file @
849bd2de
...
...
@@ -19,15 +19,7 @@ class ProfileController extends Controller
*/
public
function
index
()
{
$users
=
User
::
find
(
Auth
::
user
()
->
id
);
//dd($users->name);
//$data = Owner::where('nama',$users->name);
$data
=
DB
::
table
(
'pemilikhomestay'
)
->
where
(
'nama'
,
$users
->
name
)
->
first
();
//dd($data);
return
view
(
'adminlte::layouts.owner.profil'
)
->
with
(
'data'
,
$data
);
}
/**
...
...
@@ -71,9 +63,7 @@ class ProfileController extends Controller
public
function
edit
(
$id
)
{
//$users = User::find(Auth::user()->id);
$data
=
Owner
::
find
(
$id
);
//all()->where('id_Owner',$id);
//dd($data);
return
view
(
'adminlte::layouts.owner.updateProfil'
)
->
with
(
'data'
,
$data
);
}
/**
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/customers/profiles.blade.php
View file @
849bd2de
...
...
@@ -39,7 +39,7 @@
<
a
class
="
agileits
w3layoutswow
slideInLeft
" href="
{{
url
(
'editProfileCustomer/'
.
$data
->
id
)}}
" >Edit Profile <span class="
glyphicon
agileits
w3layouts
glyphicon
-
arrow
-
right
" aria-hidden="
true
"></span></a>
<a class="
agileits
w3layoutswow
slideInLeft
" href="
{{
url
(
'
h
istory'
)}}
">History <span class="
glyphicon
agileits
w3layouts
glyphicon
-
arrow
-
right
" aria-hidden="
true
"></span></a>
<a class="
agileits
w3layoutswow
slideInLeft
" href="
{{
url
(
'
customerH
istory'
)}}
">History <span class="
glyphicon
agileits
w3layouts
glyphicon
-
arrow
-
right
" aria-hidden="
true
"></span></a>
</div>
</div>
<div class="
clearfix
"></div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/profil.blade.php
View file @
849bd2de
...
...
@@ -49,7 +49,7 @@
</div>
</div>
<div class="
panel
-
footer
">
<a href="
{{
url
(
'profile
/'
.
$data
->
id
.
'/edit'
)}}
" data-original-title="
Edit
this
user
" data-toggle="
tooltio
" type="
button
" class="
btn
btn
-
sm
btn
-
warning
">
<a href="
{{
url
(
'profile
dit/'
.
$data
->
id
)}}
" data-original-title="
Edit
this
user
" data-toggle="
tooltio
" type="
button
" class="
btn
btn
-
sm
btn
-
warning
">
<i class="
glyphicon
glyphicon
-
edit
"></i>
</a>
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/owner/updateProfil.blade.php
View file @
849bd2de
...
...
@@ -26,7 +26,7 @@
</div>
@endif
<form action="
{{
url
(
'profile/'
.
$data
->
id
)}}
" method="
post
" enctype="
multipart
/
form
-
data
">
<form action="
{{
url
(
'profile
update
/'
.
$data
->
id
)}}
" method="
post
" enctype="
multipart
/
form
-
data
">
<input type="
hidden
" name="
_method
" value="
PUT
">
{
{csrf_field()}
}
<label>Nama</label>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partials/mainheader.blade.php
View file @
849bd2de
...
...
@@ -78,7 +78,7 @@
<!-- Menu Footer-->
<li
class=
"user-footer"
>
<div
class=
"pull-left"
>
<a
href=
"{{ url('
customerP
rofile') }}"
class=
"btn btn-default btn-flat"
>
{{ trans('adminlte_lang::message.profile') }}
</a>
<a
href=
"{{ url('
p
rofile') }}"
class=
"btn btn-default btn-flat"
>
{{ trans('adminlte_lang::message.profile') }}
</a>
</div>
<div
class=
"pull-right"
>
<a
href=
"{{ url('/logout') }}"
class=
"btn btn-default btn-flat"
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
849bd2de
...
...
@@ -91,12 +91,15 @@ Route::put('requestFasilitas/{id}','AdminController@UpdateRequestFasilitas');
Route
::
put
(
'requestFasilitass/{id}'
,
'AdminController@UpdateRequestFasilitass'
);
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
::
delete
(
'batalkanPemesanan/{id}'
,
'CustomerController@cancelPemesanan'
);
Route
::
get
(
'profile'
,
'OwnerController@profile'
);
Route
::
get
(
'profiledit/{id}'
,
'OwnerController@profileEdit'
);
Route
::
put
(
'profileupdate/{id}'
,
'OwnerController@updateProfil'
);
/*Route::get('UpdateHomestay', function(){
...
...
This diff is collapsed.
Click to expand it.
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