Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
PA2-1617-D3TK08
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
marni
PA2-1617-D3TK08
Commits
f002bc5e
Commit
f002bc5e
authored
Jun 13, 2017
by
Junedi
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
new
parent
b942f34a
Hide whitespace changes
Inline
Side-by-side
Showing
13 changed files
with
483 additions
and
109 deletions
+483
-109
.gitignore
.gitignore
+1
-0
UVotesController.php
app/Http/Controllers/UVotesController.php
+12
-2
sidebarmahasiswa.blade.php
resources/views/mahasiswa/include/sidebarmahasiswa.blade.php
+2
-2
hasil.blade.php
resources/views/polling/hasil.blade.php
+47
-29
index.blade.php
resources/views/polling/index.blade.php
+32
-10
lihat.blade.php
resources/views/polling/lihat.blade.php
+28
-24
create.blade.php
resources/views/types/create.blade.php
+160
-0
edit.blade.php
resources/views/types/edit.blade.php
+180
-5
index.blade.php
resources/views/types/index.blade.php
+2
-17
create.blade.php
resources/views/votes/create.blade.php
+0
-1
edit.blade.php
resources/views/votes/edit.blade.php
+6
-5
index.blade.php
resources/views/votes/index.blade.php
+3
-14
web.php
routes/web.php
+10
-0
No files found.
.gitignore
View file @
f002bc5e
/node_modules
/public/storage
/vendor
/.idea
Homestead.json
Homestead.yaml
...
...
app/Http/Controllers/UVotesController.php
View file @
f002bc5e
...
...
@@ -33,8 +33,18 @@ class UVotesController extends Controller
public
function
index1
(
$id
){
$types
=
Type
::
where
(
'id'
,
$id
)
->
first
();
$votes
=
$types
->
vote
;
$votess
=
$types
->
result
;
return
view
(
'polling.hasil'
,
compact
(
'votes'
,
'votess'
));
$votess
=
Result
::
where
(
'no_vote'
,
'='
,
'1'
)
->
count
(
'id'
);
$votesss
=
Result
::
where
(
'no_vote'
,
'='
,
'2'
)
->
count
(
'id'
);
$votes3
=
Result
::
where
(
'no_vote'
,
'='
,
'3'
)
->
count
(
'id'
);
$votes4
=
Result
::
where
(
'no_vote'
,
'='
,
'4'
)
->
count
(
'id'
);
$votes5
=
Result
::
where
(
'no_vote'
,
'='
,
'5'
)
->
count
(
'id'
);
$votes6
=
Result
::
where
(
'no_vote'
,
'='
,
'6'
)
->
count
(
'id'
);
return
view
(
'polling.hasil'
,
compact
(
'votes'
,
'votess'
,
'votesss'
,
'votes3'
,
'votes4'
,
'votes5'
,
'votes6'
));
}
...
...
resources/views/mahasiswa/include/sidebarmahasiswa.blade.php
View file @
f002bc5e
...
...
@@ -32,8 +32,8 @@
<a
href=
"{{route('seeupload.index')}}"
>
<img
alt=
""
src=
"{{URL::asset('admin/img/icon/PA.png')}}"
>
PA/TA
</a>
</li>
<li><a
href=
"polling"
>
Polling
</a></li>
<li><a
href=
"polling"
>
<i
class=
"fa fa-sitemap fa-fw"
></i>
Polling
</a></li>
</ul>
<!-- sidebar menu end-->
...
...
resources/views/polling/hasil.blade.php
View file @
f002bc5e
...
...
@@ -4,21 +4,13 @@
@stop
@section('content')
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<ol
class=
"breadcrumb"
>
<li><i
class=
"fa fa-home"
></i><a
href=
"{{URL::to('home')}}"
>
Home
</a></li>
<li><i
class=
"fa fa-paperclip"
></i>
Hasil
</li>
</ol>
</div>
</div>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
<h2
class=
"textCenter"
>
Daftar Kontestan
</h2>
<div
class=
"promotion cols cols--tablet"
>
<div
class=
"col-3"
>
<br>
<table
class=
"table table-striped"
>
<tr>
<th>
No.
</th>
...
...
@@ -27,7 +19,7 @@
<th>
Nama
</th>
<th>
Gambar
</th>
<th>
Voter
</th>
</tr>
<?php
$no
=
1
;
?>
...
...
@@ -40,34 +32,59 @@
<td>
<img
src=
"{{ asset('img/'.$vote->image) }}"
style=
"height:200px;width:200px;margin-top:10px;"
>
</td>
@foreach($votess as $vot)
<td>
@if(count($vot->id) > 0) {{count($vot->id)}} Vote(s) @else No Vote. Be the first to vote. @endif
</td>
</tr>
@endforeach
</tr>
@endforeach
</table>
</table><br>
<h2
class=
"textCenter"
>
Voter Sementara
</h2>
<div
class=
"promotion cols cols--tablet"
>
<div
class=
"col-3"
><br><br>
<table
class=
"table table-striped"
>
<tr>
<th>
No.1
</th>
<th>
No.2
</th>
<th>
No.3
</th>
</tr>
<tr>
<td>
@if($votess > 0) {{$votess}} Vote(s) @else No Vote. Be the first to vote. @endif
</td>
<td>
@if($votesss > 0) {{$votesss}} Vote(s) @else No Vote. Be the first to vote. @endif
</td>
<td>
@if($votes3 > 0) {{$votes3}} Vote(s) @else 0 Vote(s). @endif
</td>
</tr>
</table>
</div>
<br><br><br><br>
<!-- Core Scripts - Include with every page -->
<script
src=
"{{asset('admin/plugins/jquery-1.10.2.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/bootstrap/bootstrap.min.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/metisMenu/jquery.metisMenu.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/pace/pace.js')}}"
></script>
<script
src=
"{{asset('admin/scripts/siminta.js')}}"
></script>
<!-- Page-Level Plugin Scripts-->
<script
src=
"{{asset('admin/plugins/morris/raphael-2.1.0.min.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/morris/morris.js')}}"
></script>
<script
src=
"{{asset('admin/scripts/dashboard-demo.js')}}"
></script>
</body>
<section
class=
"bg-dark"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-12 text-center"
>
<p>
©
2016 Bootstrap HTML Template by WowThemes.net
</p>
</div>
</div>
</div>
</section>
</div>
<!-- jQuery -->
<script
src=
"{{asset('layana/js/jquery.js')}}"
></script>
<script
src=
"{{asset('layana/js/bootstrap.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/parallax.js')}}"
></script>
<script
src=
"{{asset('layana/js/contact.js')}}"
></script>
<script
src=
"{{asset('layana/js/countto.js')}}"
></script>
<script
src=
"{{asset('layana/js/jquery.easing.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/wow.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/common.js')}}"
></script>
</body>
</html>
@endsection
\ No newline at end of file
resources/views/polling/index.blade.php
View file @
f002bc5e
...
...
@@ -5,15 +5,6 @@
@stop
@section('content')
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<ol
class=
"breadcrumb"
>
<li><i
class=
"fa fa-home"
></i><a
href=
"{{URL::to('home')}}"
>
Home
</a></li>
<li><i
class=
"fa fa-paperclip"
></i>
Polling
</li>
</ol>
</div>
</div>
...
...
@@ -40,7 +31,37 @@
</table>
</div>
<!-- /container -->
<br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br><br>
<!-- Bootstrap core JavaScript
================================================== -->
<!-- Placed at the end of the document so the pages load faster -->
<section
class=
"bg-dark"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-12 text-center"
>
</body>
<p>
©
2016 Bootstrap HTML Template by WowThemes.net
</p>
</div>
</div>
</div>
</section>
<!-- jQuery -->
<script
src=
"{{asset('layana/js/jquery.js')}}"
></script>
<script
src=
"{{asset('layana/js/bootstrap.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/parallax.js')}}"
></script>
<script
src=
"{{asset('layana/js/contact.js')}}"
></script>
<script
src=
"{{asset('layana/js/countto.js')}}"
></script>
<script
src=
"{{asset('layana/js/jquery.easing.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/wow.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/common.js')}}"
></script>
</body>
</html>
@endsection
\ No newline at end of file
resources/views/polling/lihat.blade.php
View file @
f002bc5e
...
...
@@ -3,21 +3,12 @@
@stop
@section('content')
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<ol
class=
"breadcrumb"
>
<li><i
class=
"fa fa-home"
></i><a
href=
"{{URL::to('home')}}"
>
Home
</a></li>
<li><i
class=
"fa fa-paperclip"
></i>
Vote
</li>
</ol>
</div>
</div>
<div
class=
"main clearfix"
>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
<h2
class=
"textCenter"
>
Daftar Kontestan
</h2>
<div
class=
"promotion cols cols--tablet"
>
<div
class=
"col-3"
>
<br>
<table
class=
"table table-striped"
>
<tr>
...
...
@@ -27,7 +18,7 @@
<th>
Nama
</th>
<th>
Gambar
</th>
<th>
Action
</th>
<th>
Voter
</th>
</tr>
<?php
$no
=
1
;
?>
...
...
@@ -50,7 +41,7 @@
<button
class=
"btn btn-lg btn-primary btn-block"
type=
"submit"
>
Vote
</button>
</td>
</form>
<td>
@if(count($votess) > 0) {{count($votess)}} Vote(s) @else No Vote. Be the first to vote. @endif
</td>
</tr>
@endforeach
...
...
@@ -64,19 +55,31 @@
</div>
<br><br>
<!-- Core Scripts - Include with every page -->
<script
src=
"{{asset('admin/plugins/jquery-1.10.2.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/bootstrap/bootstrap.min.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/metisMenu/jquery.metisMenu.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/pace/pace.js')}}"
></script>
<script
src=
"{{asset('admin/scripts/siminta.js')}}"
></script>
<!-- Page-Level Plugin Scripts-->
<script
src=
"{{asset('admin/plugins/morris/raphael-2.1.0.min.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/morris/morris.js')}}"
></script>
<script
src=
"{{asset('admin/scripts/dashboard-demo.js')}}"
></script>
</body>
<section
class=
"bg-dark"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-12 text-center"
>
</div>
</div>
</div>
</section>
<!-- jQuery -->
<script
src=
"{{asset('layana/js/jquery.js')}}"
></script>
<script
src=
"{{asset('layana/js/bootstrap.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/parallax.js')}}"
></script>
<script
src=
"{{asset('layana/js/contact.js')}}"
></script>
<script
src=
"{{asset('layana/js/countto.js')}}"
></script>
<script
src=
"{{asset('layana/js/jquery.easing.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/wow.min.js')}}"
></script>
<script
src=
"{{asset('layana/js/common.js')}}"
></script>
</body>
</html>
@endsection
\ No newline at end of file
resources/views/types/create.blade.php
View file @
f002bc5e
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Admin Vote
</title>
<!-- Core CSS - Include with every page -->
<link
href=
"{{asset('admin/plugins/bootstrap/bootstrap.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/font-awesome/css/font-awesome.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/plugins/pace/pace-theme-big-counter.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/css/style.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/css/main-style.css')}}"
rel=
"stylesheet"
/>
<!-- Page-Level CSS -->
<link
href=
"{{asset('admin/plugins/morris/morris-0.4.3.min.css')}}"
"
rel=
"stylesheet"
/>
</head>
<body>
<!-- wrapper -->
<div
id=
"wrapper"
>
<!-- navbar top -->
<nav
class=
"navbar navbar-default navbar-fixed-top"
role=
"navigation"
id=
"navbar"
>
<!-- navbar-header -->
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".sidebar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
</div>
<!-- end navbar-header -->
<!-- navbar-top-links -->
<ul
class=
"nav navbar-top-links navbar-right"
>
<!-- main dropdown -->
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-user fa-3x"
></i>
</a>
<!-- dropdown user-->
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
><i
class=
"fa fa-user fa-fw"
></i>
User Profile
</a>
</li>
<li><a
href=
"#"
><i
class=
"fa fa-gear fa-fw"
></i>
Settings
</a>
</li>
<li
class=
"divider"
></li>
<li><a
href=
"logout"
><i
class=
"fa fa-sign-out fa-fw"
></i>
Logout
</a>
</li>
</ul>
<!-- end dropdown-user -->
</li>
<!-- end main dropdown -->
</ul>
<!-- end navbar-top-links -->
</nav>
<!-- end navbar top -->
z
<!-- navbar side -->
<nav
class=
"navbar-default navbar-static-side"
role=
"navigation"
>
<!-- sidebar-collapse -->
<div
class=
"sidebar-collapse"
>
<!-- side-menu -->
<ul
class=
"nav"
id=
"side-menu"
>
<li>
<!-- user image section-->
<div
class=
"user-section"
>
<div
class=
"user-section-inner"
>
<img
src=
"admin/img/user.jpg"
alt=
""
>
</div>
<div
class=
"user-info"
>
<div><strong>
Administrator
</strong></div>
<div
class=
"user-text-online"
>
<span
class=
"user-circle-online btn btn-success btn-circle "
></span>
Online
</div>
</div>
</div>
<!--end user image section-->
</li>
<li
class=
"selected"
>
<a
href=
"halamanAdmin"
><i
class=
"fa fa-dashboard fa-fw"
></i>
Admin Dashboard
</a>
</li>
<li>
<a
href=
"register"
><i
class=
"fa fa-edit fa-fw"
></i>
Create New User
</a>
</li>
<li>
<a
href=
""
><i
class=
"fa fa-sitemap fa-fw"
></i>
Create New Polling
</a>
</li>
<li>
<a
href=
"#"
><i
class=
"fa fa-wrench fa-fw"
></i>
UI Elements
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li>
<a
href=
"panels-wells.html"
>
Panels and Wells
</a>
</li>
<li>
<a
href=
"buttons.html"
>
Buttons
</a>
</li>
<li>
<a
href=
"notifications.html"
>
Notifications
</a>
</li>
<li>
<a
href=
"typography.html"
>
Typography
</a>
</li>
<li>
<a
href=
"grid.html"
>
Grid
</a>
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a
href=
"#"
><i
class=
"fa fa-sitemap fa-fw"
></i>
Multi-Level Dropdown
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li>
<a
href=
"#"
>
Second Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Second Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-third-level"
>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
</ul>
<!-- third-level-items -->
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a
href=
"#"
><i
class=
"fa fa-files-o fa-fw"
></i>
Sample Pages
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li>
<a
href=
"blank.html"
>
Blank Page
</a>
</li>
<li>
<a
href=
"login.html"
>
Login Page
</a>
</li>
</ul>
<!-- second-level-items -->
</li>
</ul>
<!-- end side-menu -->
</div>
<!-- end sidebar-collapse -->
</nav>
<!-- end navbar side -->
<!-- page-wrapper -->
<br>
<div
id=
"page-wrapper"
>
<div
class=
"main clearfix"
>
...
...
resources/views/types/edit.blade.php
View file @
f002bc5e
<!DOCTYPE html>
<html>
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<title>
Admin Vote
</title>
<!-- Core CSS - Include with every page -->
<link
href=
"{{asset('admin/plugins/bootstrap/bootstrap.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/font-awesome/css/font-awesome.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/plugins/pace/pace-theme-big-counter.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/css/style.css')}}"
rel=
"stylesheet"
/>
<link
href=
"{{asset('admin/css/main-style.css')}}"
rel=
"stylesheet"
/>
<!-- Page-Level CSS -->
<link
href=
"{{asset('admin/plugins/morris/morris-0.4.3.min.css')}}"
"
rel=
"stylesheet"
/>
</head>
<body>
<!-- wrapper -->
<div
id=
"wrapper"
>
<!-- navbar top -->
<nav
class=
"navbar navbar-default navbar-fixed-top"
role=
"navigation"
id=
"navbar"
>
<!-- navbar-header -->
<div
class=
"navbar-header"
>
<button
type=
"button"
class=
"navbar-toggle"
data-toggle=
"collapse"
data-target=
".sidebar-collapse"
>
<span
class=
"sr-only"
>
Toggle navigation
</span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
<span
class=
"icon-bar"
></span>
</button>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h1>
Mengubah Data Vote
</h1>
</div>
</div>
</div>
<!-- end navbar-header -->
<!-- navbar-top-links -->
<ul
class=
"nav navbar-top-links navbar-right"
>
<!-- main dropdown -->
<li
class=
"dropdown"
>
<a
class=
"dropdown-toggle"
data-toggle=
"dropdown"
href=
"#"
>
<i
class=
"fa fa-user fa-3x"
></i>
</a>
<!-- dropdown user-->
<ul
class=
"dropdown-menu dropdown-user"
>
<li><a
href=
"#"
><i
class=
"fa fa-user fa-fw"
></i>
User Profile
</a>
</li>
<li><a
href=
"#"
><i
class=
"fa fa-gear fa-fw"
></i>
Settings
</a>
</li>
<li
class=
"divider"
></li>
<li><a
href=
"logout"
><i
class=
"fa fa-sign-out fa-fw"
></i>
Logout
</a>
</li>
</ul>
<!-- end dropdown-user -->
</li>
<!-- end main dropdown -->
</ul>
<!-- end navbar-top-links -->
</nav>
<!-- end navbar top -->
z
<!-- navbar side -->
<nav
class=
"navbar-default navbar-static-side"
role=
"navigation"
>
<!-- sidebar-collapse -->
<div
class=
"sidebar-collapse"
>
<!-- side-menu -->
<ul
class=
"nav"
id=
"side-menu"
>
<li>
<!-- user image section-->
<div
class=
"user-section"
>
<div
class=
"user-section-inner"
>
<img
src=
"admin/img/user.jpg"
alt=
""
>
</div>
<div
class=
"user-info"
>
<div><strong>
Administrator
</strong></div>
<div
class=
"user-text-online"
>
<span
class=
"user-circle-online btn btn-success btn-circle "
></span>
Online
</div>
</div>
</div>
<!--end user image section-->
</li>
<li
class=
"selected"
>
<a
href=
"halamanAdmin"
><i
class=
"fa fa-dashboard fa-fw"
></i>
Admin Dashboard
</a>
</li>
<li>
<a
href=
"register"
><i
class=
"fa fa-edit fa-fw"
></i>
Create New User
</a>
</li>
<li>
<a
href=
"votes"
><i
class=
"fa fa-sitemap fa-fw"
></i>
Create New Polling
</a>
</li>
<li>
<a
href=
"#"
><i
class=
"fa fa-wrench fa-fw"
></i>
UI Elements
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li>
<a
href=
"panels-wells.html"
>
Panels and Wells
</a>
</li>
<li>
<a
href=
"buttons.html"
>
Buttons
</a>
</li>
<li>
<a
href=
"notifications.html"
>
Notifications
</a>
</li>
<li>
<a
href=
"typography.html"
>
Typography
</a>
</li>
<li>
<a
href=
"grid.html"
>
Grid
</a>
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a
href=
"#"
><i
class=
"fa fa-sitemap fa-fw"
></i>
Multi-Level Dropdown
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li>
<a
href=
"#"
>
Second Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Second Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-third-level"
>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
<li>
<a
href=
"#"
>
Third Level Item
</a>
</li>
</ul>
<!-- third-level-items -->
</li>
</ul>
<!-- second-level-items -->
</li>
<li>
<a
href=
"#"
><i
class=
"fa fa-files-o fa-fw"
></i>
Sample Pages
<span
class=
"fa arrow"
></span></a>
<ul
class=
"nav nav-second-level"
>
<li>
<a
href=
"blank.html"
>
Blank Page
</a>
</li>
<li>
<a
href=
"login.html"
>
Login Page
</a>
</li>
</ul>
<!-- second-level-items -->
</li>
</ul>
<!-- end side-menu -->
</div>
<!-- end sidebar-collapse -->
</nav>
<!-- end navbar side -->
<!-- page-wrapper -->
<br>
<div
id=
"page-wrapper"
>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
<h2
class=
"textCenter"
>
Edit Data Vote
</h2>
<div
class=
"promotion cols cols--tablet"
>
<div
class=
"col-3"
>
<form
class=
""
action=
"{{route('types.update',$type->id)}}"
method=
"post"
>
<input
name=
"_method"
type=
"hidden"
value=
"PATCH"
>
{{csrf_field()}}
...
...
@@ -20,3 +182,16 @@
<input
type=
"submit"
class=
"btn btn-primary"
value=
"save"
>
</div>
</form>
<script
src=
"{{asset('admin/plugins/jquery-1.10.2.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/bootstrap/bootstrap.min.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/metisMenu/jquery.metisMenu.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/pace/pace.js')}}"
></script>
<script
src=
"{{asset('admin/scripts/siminta.js')}}"
></script>
<!-- Page-Level Plugin Scripts-->
<script
src=
"{{asset('admin/plugins/morris/raphael-2.1.0.min.js')}}"
></script>
<script
src=
"{{asset('admin/plugins/morris/morris.js')}}"
></script>
<script
src=
"{{asset('admin/scripts/dashboard-demo.js')}}"
></script>
</body>
</html>
resources/views/types/index.blade.php
View file @
f002bc5e
@
extends
(
'layouts.master'
)
@
section
(
'breadcrump'
)
@
stop
@
section
(
'content'
)
<
div
class
="
row
">
<div class="
col
-
lg
-
12
">
<ol class="
breadcrumb
">
<li><i class="
fa
fa
-
home
"></i><a href="
{{
URL
::
to
(
'home'
)}}
">Home</a></li>
<li><i class="
fa
fa
-
paperclip
"></i>Daftar Vote</li>
</ol>
</div>
</div>
<div
id=
"page-wrapper"
>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
...
...
@@ -26,6 +13,7 @@
<th>
Nama Vote
</th>
<th>
Action
</th>
</tr>
<a
href=
"{{route('kandidat.index')}}"
class=
"btn btn-info"
>
Kandidat
</a>
<a
href=
"{{ route('types.create') }}"
class=
"btn btn-info pull-right"
>
Tambah Data type
</a>
@foreach($types as $type)
...
...
@@ -38,8 +26,7 @@
<input
type=
"hidden"
name=
"_token"
value=
"{{ csrf_token() }}"
>
<a
href=
"{{route('types.edit',$type->id)}}"
class=
"btn btn-primary"
>
Edit
</a>
<input
type=
"submit"
class=
"btn btn-danger"
onclick=
"return confirm('are you sure to delete?')"
name=
"name"
value=
"delete"
>
<a href="
{{
route
(
'types.edit'
,
$type
->
id
)}}
" class="
btn
btn
-
primary
">Hasil</a>
</form>
</td>
</tr>
...
...
@@ -60,4 +47,3 @@
</body>
</html>
@endsection
\ No newline at end of file
resources/views/votes/create.blade.php
View file @
f002bc5e
<div
id=
"page-wrapper"
>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
...
...
resources/views/votes/edit.blade.php
View file @
f002bc5e
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<h1>
Mengubah Data Kontestan Polling
</h1>
</div>
</div>
<div
id=
"page-wrapper"
>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
<h2
class=
"textCenter"
>
Edit Data Kandidat
</h2>
<div
class=
"promotion cols cols--tablet"
>
<form
class=
""
action=
"{{route('votes.update',$vote->no_vote)}}"
method=
"post"
>
<input
name=
"_method"
type=
"hidden"
value=
"PATCH"
>
{{csrf_field()}}
...
...
resources/views/votes/index.blade.php
View file @
f002bc5e
...
...
@@ -3,17 +3,6 @@
@stop
@section('content')
<div
class=
"row"
>
<div
class=
"col-lg-12"
>
<ol
class=
"breadcrumb"
>
<li><i
class=
"fa fa-home"
></i><a
href=
"{{URL::to('home')}}"
>
Home
</a></li>
<li><i
class=
"fa fa-paperclip"
></i>
Create New File
</li>
</ol>
</div>
</div>
<div
id=
"page-wrapper"
>
<div
class=
"main clearfix"
>
<div
class=
"contain landing-section"
>
...
...
@@ -29,7 +18,7 @@
<th>
Gambar
</th>
<th>
Action
</th>
</tr>
<a
href=
"{{route('
votes
.create')}}"
class=
"btn btn-info pull-right"
>
Tambah Kontestan
</a>
<a
href=
"{{route('
kandidat
.create')}}"
class=
"btn btn-info pull-right"
>
Tambah Kontestan
</a>
<a
href=
"{{route('types.index')}}"
class=
"btn btn-info"
>
Type Vote
</a>
<?php
$no
=
1
;
?>
@foreach($vote as $votes)
...
...
@@ -43,10 +32,10 @@
<td><img
src=
"{{ asset('img/'.$votes->image) }}"
style=
"height:200px;width:200px;margin-top:10px;"
>
</td>
<td>
<form
class=
""
action=
"{{route('
votes
.destroy',$votes->no_vote)}}"
method=
"post"
>
<form
class=
""
action=
"{{route('
kandidat
.destroy',$votes->no_vote)}}"
method=
"post"
>
<input
type=
"hidden"
name=
"_method"
value=
"delete"
>
<input
type=
"hidden"
name=
"_token"
value=
"{{ csrf_token() }}"
>
<a
href=
"{{route('
votes
.edit',$votes->no_vote)}}"
class=
"btn btn-primary"
>
Edit
</a>
<a
href=
"{{route('
kandidat
.edit',$votes->no_vote)}}"
class=
"btn btn-primary"
>
Edit
</a>
<input
type=
"submit"
class=
"btn btn-danger"
onclick=
"return confirm('are you sure to delete?')"
name=
"name"
value=
"delete"
>
...
...
routes/web.php
View file @
f002bc5e
...
...
@@ -152,6 +152,16 @@ Route::group(['middleware'=> ['web']],function (){
Route
::
group
([
'middleware'
=>
[
'web'
]],
function
(){
Route
::
resource
(
'/votes'
,
'VotesController'
);
//vote
Route
::
group
([
'middleware'
=>
[
'web'
]],
function
(){
Route
::
resource
(
'/votes'
,
'TypeController'
);
});
Route
::
group
([
'middleware'
=>
[
'web'
]],
function
(){
Route
::
resource
(
'/kandidat'
,
'VotesController'
);
});
});
Route
::
group
([
'middleware'
=>
[
'web'
]],
function
(){
Route
::
post
(
'/voting'
,
'ResultController@voting'
);
...
...
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