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
71ca9b89
Commit
71ca9b89
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
e54c8b3a
3ebac740
Show whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
246 additions
and
126 deletions
+246
-126
Homestay.php
app/Homestay.php
+15
-0
AdminController.php
app/Http/Controllers/AdminController.php
+71
-2
LoginController.php
app/Http/Controllers/Auth/LoginController.php
+4
-0
RegisterController.php
app/Http/Controllers/Auth/RegisterController.php
+1
-1
User.php
app/User.php
+1
-1
all.css
public/css/all.css
+0
-111
style.css
public/css/style.css
+115
-0
register.blade.php
resources/views/vendor/adminlte/auth/register.blade.php
+4
-0
listPengajuan.blade.php
...ews/vendor/adminlte/layouts/admin/listPengajuan.blade.php
+14
-3
listRequestFasilitas.blade.php
...dor/adminlte/layouts/admin/listRequestFasilitas.blade.php
+14
-3
htmlheader.blade.php
...s/vendor/adminlte/layouts/partialweb/htmlheader.blade.php
+1
-0
mainheader.blade.php
...s/vendor/adminlte/layouts/partialweb/mainheader.blade.php
+2
-2
web.php
routes/web.php
+4
-3
No files found.
app/Homestay.php
0 → 100644
View file @
71ca9b89
<?php
namespace
App
;
use
Illuminate\Database\Eloquent\Model
;
class
Homestay
extends
Model
{
protected
$table
=
"homestay"
;
protected
$fillable
=
[
'idPemilik'
,
'nama'
,
'owner'
,
'alamat'
,
'jumlahKamar'
,
'harga'
,
'status'
,
];
}
This diff is collapsed.
Click to expand it.
app/Http/Controllers/AdminController.php
View file @
71ca9b89
...
...
@@ -2,7 +2,9 @@
namespace
App\Http\Controllers
;
use
App\Homestay
;
use
App\RequestHomestay
;
use
App\Room
;
use
Illuminate\Http\Request
;
use
App\User
;
use
Validator
;
...
...
@@ -10,6 +12,7 @@ use App\Http\Controllers\Controller;
use
Illuminate\Foundation\Auth\RegistersUsers
;
use
App\Owner
;
use
Illuminate\Support\Facades\DB
;
use
App\RequestFasilitas
;
class
AdminController
extends
Controller
{
...
...
@@ -88,19 +91,85 @@ class AdminController extends Controller
->
with
(
'count'
,
$count
);
}
public
function
RequestFasilitas
(){
public
function
UpdateRequestFasilitass
(
$id
){
$data
=
DB
::
table
(
'requestfasilitas'
)
->
where
(
'id'
,
$id
)
->
first
();
$RF
=
RequestFasilitas
::
find
(
$id
);
$RF
->
status
=
2
;
$RF
->
update
();
return
redirect
(
'requestFasilitas'
);
}
public
function
UpdateRequestFasilitas
(
$id
){
//$data = DB::table('requestfasilitas')->where('id', $id)->first();
$RF
=
RequestFasilitas
::
find
(
$id
);
$RF
->
status
=
1
;
$RF
->
update
();
return
redirect
(
'requestFasilitas'
);
}
public
function
RequestFasilitas
(){
$data
=
DB
::
table
(
'pemilikhomestay'
)
->
join
(
'requestfasilitas'
,
'pemilikhomestay.id'
,
'='
,
'requestfasilitas.id_pemilik_homestay'
)
->
select
(
'pemilikhomestay.nama'
,
'requestfasilitas.*'
)
->
get
();
//dd('masuk agan');
$count
=
$data
->
count
();
return
view
(
'adminlte::layouts.admin.listRequestFasilitas'
)
->
with
(
'data'
,
$data
)
->
with
(
'count'
,
$count
);
}
public
function
AccPengajuanHomestay
(
$id
){
//dd("masuk gan");
$RH
=
RequestHomestay
::
find
(
$id
);
$RH
->
status
=
1
;
$data
=
DB
::
table
(
'pengajuan_homestay'
)
->
join
(
'pemilikhomestay'
,
'pemilikhomestay.id'
,
'='
,
'pengajuan_homestay.idPemilikHomestay'
)
->
select
(
'pemilikhomestay.nama'
,
'pemilikhomestay.alamat'
)
->
where
(
'pemilikhomestay.id'
,
'='
,
$RH
->
idPemilikHomestay
)
->
get
();
//dd($data[0]->nama,$data[0]->alamat);
$hs
=
new
Homestay
();
$hs
->
idPemilik
=
$RH
->
idPemilikHomestay
;
$hs
->
nama
=
$RH
->
namaHomestay
;
$hs
->
owner
=
$data
[
0
]
->
nama
;
$hs
->
alamat
=
$data
[
0
]
->
alamat
;
$hs
->
jumlahKamar
=
$RH
->
jumlahKamar
;
$hs
->
harga
=
150000
;
$hs
->
status
=
'----'
;
$hs
->
save
();
$idHts
=
DB
::
table
(
'homestay'
)
->
select
(
'homestay.*'
)
->
where
(
'homestay.owner'
,
'='
,
$data
[
0
]
->
nama
)
->
get
();
//dd("sampai sini dulu",$idHts);
for
(
$i
=
1
;
$i
<=
$RH
->
jumlahKamar
;
$i
++
){
$km
=
new
Room
();
$km
->
idHomestay
=
$idHts
[
0
]
->
id
;
$km
->
nomor_kamar
=
$i
;
$km
->
jumlah_bed
=
2
;
$km
->
save
();
}
$RH
->
update
();
return
redirect
(
'requestHomestay'
);
}
public
function
destroy
(
$id
)
{
//
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Auth/LoginController.php
View file @
71ca9b89
...
...
@@ -60,6 +60,10 @@ class LoginController extends Controller
else
if
(
Auth
::
user
()
->
role
==
'Owner'
){
return
redirect
()
->
intended
(
'/owner'
);
}
else
if
(
Auth
::
user
()
->
role
==
'Customer'
){
//dd("masuk gan");
return
redirect
(
'/'
);
}
else
{
$validator
->
errors
()
->
add
(
'password'
,
'Password tidak benar'
);
return
redirect
(
'/login'
)
...
...
This diff is collapsed.
Click to expand it.
app/Http/Controllers/Auth/RegisterController.php
View file @
71ca9b89
...
...
@@ -82,7 +82,7 @@ class RegisterController extends Controller
'username'
=>
$data
[
'username'
],
'email'
=>
$data
[
'email'
],
'password'
=>
bcrypt
(
$data
[
'password'
]),
'role'
=>
$data
[
'role'
]
,
'role'
=>
'Customer'
,
]);
}
}
This diff is collapsed.
Click to expand it.
app/User.php
View file @
71ca9b89
...
...
@@ -17,7 +17,7 @@ class User extends Authenticatable
*/
protected
$fillable
=
[
'name'
,
'email'
,
'password'
,
'name'
,
'email'
,
'password'
,
'username'
,
'role'
];
/**
...
...
This diff is collapsed.
Click to expand it.
public/css/all.css
View file @
71ca9b89
...
...
@@ -3128,117 +3128,6 @@ tbody.collapse.in {
.dropdown-toggle
:focus
{
outline
:
0
;
}
.dropdown-menu
{
position
:
absolute
;
top
:
100%
;
left
:
0
;
z-index
:
1000
;
display
:
none
;
float
:
left
;
min-width
:
160px
;
padding
:
5px
0
;
margin
:
2px
0
0
;
list-style
:
none
;
font-size
:
14px
;
text-align
:
left
;
background-color
:
#fff
;
border
:
1px
solid
#ccc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.15
);
border-radius
:
4px
;
box-shadow
:
0
6px
12px
rgba
(
0
,
0
,
0
,
0.175
);
background-clip
:
padding-box
;
}
.dropdown-menu.pull-right
{
right
:
0
;
left
:
auto
;
}
.dropdown-menu
.divider
{
height
:
1px
;
margin
:
10px
0
;
overflow
:
hidden
;
background-color
:
#e5e5e5
;
}
.dropdown-menu
>
li
>
a
{
display
:
block
;
padding
:
3px
20px
;
clear
:
both
;
font-weight
:
normal
;
line-height
:
1.6
;
color
:
#333333
;
white-space
:
nowrap
;
}
.dropdown-menu
>
li
>
a
:hover
,
.dropdown-menu
>
li
>
a
:focus
{
text-decoration
:
none
;
color
:
#262626
;
background-color
:
#f5f5f5
;
}
.dropdown-menu
>
.active
>
a
,
.dropdown-menu
>
.active
>
a
:hover
,
.dropdown-menu
>
.active
>
a
:focus
{
color
:
#fff
;
text-decoration
:
none
;
outline
:
0
;
background-color
:
#3097D1
;
}
.dropdown-menu
>
.disabled
>
a
,
.dropdown-menu
>
.disabled
>
a
:hover
,
.dropdown-menu
>
.disabled
>
a
:focus
{
color
:
#777777
;
}
.dropdown-menu
>
.disabled
>
a
:hover
,
.dropdown-menu
>
.disabled
>
a
:focus
{
text-decoration
:
none
;
background-color
:
transparent
;
background-image
:
none
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
enabled
=
false
);
cursor
:
not-allowed
;
}
.open
>
.dropdown-menu
{
display
:
block
;
}
.open
>
a
{
outline
:
0
;
}
.dropdown-menu-right
{
left
:
auto
;
right
:
0
;
}
.dropdown-menu-left
{
left
:
0
;
right
:
auto
;
}
.dropdown-header
{
display
:
block
;
padding
:
3px
20px
;
font-size
:
12px
;
line-height
:
1.6
;
color
:
#777777
;
white-space
:
nowrap
;
}
.dropdown-backdrop
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
z-index
:
990
;
}
.pull-right
>
.dropdown-menu
{
right
:
0
;
left
:
auto
;
}
.dropup
.caret
,
.navbar-fixed-bottom
.dropdown
.caret
{
border-top
:
0
;
border-bottom
:
4px
dashed
;
border-bottom
:
4px
solid
\
9
;
content
:
""
;
}
.dropup
.dropdown-menu
,
.navbar-fixed-bottom
.dropdown
.dropdown-menu
{
top
:
auto
;
bottom
:
100%
;
margin-bottom
:
2px
;
}
@media
(
min-width
:
768px
)
{
.navbar-right
.dropdown-menu
{
right
:
0
;
left
:
auto
;
}
.navbar-right
.dropdown-menu-left
{
left
:
0
;
right
:
auto
;
}
}
.btn-group
,
.btn-group-vertical
{
...
...
This diff is collapsed.
Click to expand it.
public/css/style.css
View file @
71ca9b89
...
...
@@ -387,6 +387,119 @@ ul.callbacks_tabs li {
/*-- //Services --*/
.dropdown-menu
{
position
:
absolute
;
top
:
100%
;
left
:
0
;
z-index
:
1000
;
display
:
none
;
float
:
left
;
min-width
:
160px
;
padding
:
5px
0
;
margin
:
2px
0
0
;
list-style
:
none
;
font-size
:
14px
;
text-align
:
left
;
background-color
:
#23c8d9
;
border
:
1px
solid
#ccc
;
border
:
1px
solid
rgba
(
0
,
0
,
0
,
0.15
);
border-radius
:
4px
;
box-shadow
:
0
6px
12px
rgba
(
0
,
0
,
0
,
0.175
);
background-clip
:
padding-box
;
}
.dropdown-menu.pull-right
{
right
:
0
;
left
:
auto
;
}
.dropdown-menu
.divider
{
height
:
1px
;
margin
:
10px
0
;
overflow
:
hidden
;
background-color
:
#e5e5e5
;
}
.dropdown-menu
>
li
>
a
{
display
:
block
;
padding
:
3px
20px
;
clear
:
both
;
font-weight
:
normal
;
line-height
:
1.6
;
color
:
#333333
;
white-space
:
nowrap
;
}
.dropdown-menu
>
li
>
a
:hover
,
.dropdown-menu
>
li
>
a
:focus
{
text-decoration
:
none
;
color
:
#262626
;
background-color
:
#f5f5f5
;
}
.dropdown-menu
>
.active
>
a
,
.dropdown-menu
>
.active
>
a
:hover
,
.dropdown-menu
>
.active
>
a
:focus
{
color
:
#fff
;
text-decoration
:
none
;
outline
:
0
;
background-color
:
#3097D1
;
}
.dropdown-menu
>
.disabled
>
a
,
.dropdown-menu
>
.disabled
>
a
:hover
,
.dropdown-menu
>
.disabled
>
a
:focus
{
color
:
#777777
;
}
.dropdown-menu
>
.disabled
>
a
:hover
,
.dropdown-menu
>
.disabled
>
a
:focus
{
text-decoration
:
none
;
background-color
:
transparent
;
background-image
:
none
;
filter
:
progid
:
DXImageTransform
.
Microsoft
.
gradient
(
enabled
=
false
);
cursor
:
not-allowed
;
}
.open
>
.dropdown-menu
{
display
:
block
;
}
.open
>
a
{
outline
:
0
;
}
.dropdown-menu-right
{
left
:
auto
;
right
:
0
;
}
.dropdown-menu-left
{
left
:
0
;
right
:
auto
;
}
.dropdown-header
{
display
:
block
;
padding
:
3px
20px
;
font-size
:
12px
;
line-height
:
1.6
;
color
:
#777777
;
white-space
:
nowrap
;
}
.dropdown-backdrop
{
position
:
fixed
;
left
:
0
;
right
:
0
;
bottom
:
0
;
top
:
0
;
z-index
:
990
;
}
.pull-right
>
.dropdown-menu
{
right
:
0
;
left
:
auto
;
}
.dropup
.caret
,
.navbar-fixed-bottom
.dropdown
.caret
{
border-top
:
0
;
border-bottom
:
4px
dashed
;
border-bottom
:
4px
solid
\
9
;
content
:
""
;
}
.dropup
.dropdown-menu
,
.navbar-fixed-bottom
.dropdown
.dropdown-menu
{
top
:
auto
;
bottom
:
100%
;
margin-bottom
:
2px
;
}
@media
(
min-width
:
768px
)
{
.navbar-right
.dropdown-menu
{
right
:
0
;
left
:
auto
;
}
.navbar-right
.dropdown-menu-left
{
left
:
0
;
right
:
auto
;
}
}
/*-- Awards --*/
...
...
@@ -4581,4 +4694,5 @@ p.contact-p {
/*-- //Responsive Code --*/
\ No newline at end of file
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/auth/register.blade.php
View file @
71ca9b89
...
...
@@ -33,6 +33,10 @@
<span class="
glyphicon
glyphicon
-
user
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input type="
text
" class="
form
-
control
" placeholder="
username
" name="
username
" value="
{{
old
(
'username'
)
}}
"/>
<span class="
glyphicon
glyphicon
-
user
form
-
control
-
feedback
"></span>
</div>
<div class="
form
-
group
has
-
feedback
">
<input type="
email
" class="
form
-
control
" placeholder="
{{
trans
(
'adminlte_lang::message.email'
)
}}
" name="
email
" value="
{{
old
(
'email'
)
}}
"/>
<span class="
glyphicon
glyphicon
-
envelope
form
-
control
-
feedback
"></span>
</div>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/admin/listPengajuan.blade.php
View file @
71ca9b89
...
...
@@ -48,14 +48,25 @@
<td>
{
{$a->nama}
}
</td>
<td>
{
{$a->namaHomestay}
}
</td>
<td>
{
{$a->jumlahKamar}
}
</td>
<td><a href="
{{
url
(
'room/'
.
$a
->
idPengajuan
.
'/edit'
)}}
" class="
btn
btn
-
primary
"><i class="
glyphicon
glyphicon
-
edit
"> Terima</i></a></td>
@if(
$a->status
==1)
<td>Di Terima</td>
@elseif(
$a->status
==2)
<td>Ditolak</td>
@elseif(
$a->status
==0)
<td>
<form action="
{{
url
(
'room/'
.
$a
->
idPengajuan
)}}
" method="
POST
">
<form action="
{{
url
(
'listPengajuanHomestay/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
DELETE
">
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
info
"><i class="
glyphicon
glyphicon
-
apple
"> Terima</i></button>
</form>
<td>
<form action="
{{
url
(
'listPengajuanHomestay/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
danger
"><i class="
glyphicon
glyphicon
-
trash
"> Tolak</i></button>
</form>
</td>
@endif
</tr>
@endforeach
</table>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/admin/listRequestFasilitas.blade.php
View file @
71ca9b89
...
...
@@ -57,14 +57,25 @@
<img alt="
User
Pic
" src="
img
/
{{
$data
->
gambar
}}
" class="
img
-
circle
img
-
responsive
">
@endif
</td>
<td><a href="
{{
url
(
'room/'
.
$a
->
id
.
'/edit'
)}}
" class="
btn
btn
-
primary
"><i class="
glyphicon
glyphicon
-
edit
"> Terima</i></a></td>
@if(
$a->status
==1)
<td>Di Terima</td>
@elseif(
$a->status
==2)
<td>Ditolak</td>
@elseif(
$a->status
==0)
<td>
<form action="
{{
url
(
'room/'
.
$a
->
id
)}}
" method="
POST
">
<form action="
{{
url
(
'requestFasilitas/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
DELETE
">
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
info
"><i class="
glyphicon
glyphicon
-
apple
"> Terima</i></button>
</form>
<td>
<form action="
{{
url
(
'requestFasilitass/'
.
$a
->
id
)}}
" method="
post
">
{
{csrf_field()}
}
<input type="
hidden
" name="
_method
" value="
PUT
">
<button type="
submit
" class="
btn
btn
-
danger
"><i class="
glyphicon
glyphicon
-
trash
"> Tolak</i></button>
</form>
</td>
@endif
</tr>
@endforeach
</table>
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partialweb/htmlheader.blade.php
View file @
71ca9b89
...
...
@@ -15,6 +15,7 @@
<!-- Index-Page-CSS -->
<link
rel=
"stylesheet"
href=
"css/style.css"
type=
"text/css"
media=
"all"
>
<!-- Animate.CSS -->
<link
rel=
"stylesheet"
href=
"css/animate.css"
type=
"text/css"
media=
"all"
>
<!-- Tanggal -->
<link
rel=
"stylesheet"
href=
"css/jquery-ui.css"
type=
"text/css"
media=
"all"
>
<!-- All css -->
<link
href=
"{{ asset('/css/all.css') }}"
rel=
"stylesheet"
type=
"text/css"
/>
<!-- //Custom-Stylesheet-Links -->
<!-- Fonts -->
...
...
This diff is collapsed.
Click to expand it.
resources/views/vendor/adminlte/layouts/partialweb/mainheader.blade.php
View file @
71ca9b89
...
...
@@ -27,14 +27,14 @@
<!-- Menu Toggle Button -->
<a
href=
"#"
class=
"dropdown-toggle"
data-toggle=
"dropdown"
>
<!-- The user image in the navbar-->
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"user-image"
alt=
"User Image"
/>
{{--
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"user-image"
alt=
"User Image"
/>
--}}
<!-- hidden-xs hides the username on small devices so only the image appears. -->
<span
class=
"hidden-xs"
>
{{ Auth::user()->name }}
</span>
</a>
<ul
class=
"dropdown-menu"
>
<!-- The user image in the menu -->
<li
class=
"user-header"
>
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"img-circle"
alt=
"User Image"
/>
{{--
<img
src=
"{{ Gravatar::get($user->email) }}"
class=
"img-circle"
alt=
"User Image"
/>
--}}
<p>
{{ Auth::user()->name }}
<small>
{{ trans('adminlte_lang::message.login') }}
</small>
...
...
This diff is collapsed.
Click to expand it.
routes/web.php
View file @
71ca9b89
...
...
@@ -50,12 +50,13 @@ Route::get('pengajuanHomestay','OwnerController@pengajuan');
Route
::
post
(
'pengajuanHomestay'
,
'OwnerController@storePengajuan'
);
Route
::
get
(
'listPengajuan'
,
'OwnerController@listPengajuan'
);
Route
::
get
(
'listPengajuanFasilitas'
,
'OwnerController@listPengajuanFasilitas'
);
Route
::
put
(
'requestFasilitas/{id}'
,
'AdminController@UpdateRequestFasilitas'
);
Route
::
put
(
'requestFasilitass/{id}'
,
'AdminController@UpdateRequestFasilitass'
);
Route
::
put
(
'listPengajuanHomestay/{id}'
,
'AdminController@AccPengajuanHomestay'
);
Route
::
resource
(
'profile'
,
'ProfileController'
);
Route
::
resource
(
'room'
,
'RoomController'
);
Route
::
get
(
'listRoom'
,
'RoomController@listRoom'
);
Route
::
get
(
'reqFasilitas'
,
'OwnerController@requestFasilitas'
);
Route
::
post
(
'reqFasilitas'
,
'OwnerController@storeRequest'
);
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