Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
E
event
Overview
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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
fezrul
event
Commits
a216581e
Commit
a216581e
authored
Sep 13, 2018
by
fezrul
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
scanner
parent
42686604
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
73 additions
and
147 deletions
+73
-147
app/Http/Controllers/HomeController.php
+18
-0
resources/views/admin/scan.blade.php
+54
-147
resources/views/layouts/scann.blade.php
+0
-0
routes/web.php
+1
-0
No files found.
app/Http/Controllers/HomeController.php
View file @
a216581e
...
@@ -127,6 +127,24 @@ class HomeController extends Controller
...
@@ -127,6 +127,24 @@ class HomeController extends Controller
}
}
public
function
checkUser
(
Request
$request
)
{
$result
=
0
;
if
(
$request
->
data
)
{
$user
=
User
::
where
(
'QRpassword'
,
$request
->
data
)
->
first
();
if
(
$user
)
{
Sentinel
::
authenticate
(
$user
);
$result
=
1
;
}
else
{
$result
=
0
;
}
}
return
$result
;
}
public
function
editevent
(
$id
)
public
function
editevent
(
$id
)
{
{
...
...
resources/views/admin/scan.blade.php
View file @
a216581e
<!doctype html>
@
extends
(
'layouts.scan'
)
<html
lang=
"zxx"
>
@
section
(
'content'
)
<head>
<meta
charset=
"utf-8"
>
<meta
name=
"viewport"
content=
"width=device-width, initial-scale=1.0"
>
<meta
name=
"description"
content=
"Event Handler"
>
<meta
name=
"author"
content=
"3F Resources"
>
<title>
MyEvent - 3F Resources.com
</title>
<!-- Google fonts -->
<link
href=
"https://fonts.googleapis.com/css?family=Roboto:300,400,700"
rel=
"stylesheet"
>
<!-- CSS Files -->
<link
href=
"../css/bootstrap.min.css"
rel=
"stylesheet"
/>
<link
href=
"../css/font-awesome.min.css"
rel=
"stylesheet"
/>
<link
href=
"../css/material-kit.css"
rel=
"stylesheet"
/>
<link
href=
"../css/owl.carousel.css"
rel=
"stylesheet"
/>
<link
href=
"../css/style.css"
rel=
"stylesheet"
/>
<link
rel=
"stylesheet"
href=
"../scans.css"
>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/webrtc-adapter/3.3.3/adapter.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://cdnjs.cloudflare.com/ajax/libs/vue/2.1.10/vue.min.js"
></script>
<script
type=
"text/javascript"
src=
"https://rawgit.com/schmich/instascan-builds/master/instascan.min.js"
></script>
<!-- favicon -->
<link
rel=
"icon"
href=
"img/favicon.ico"
>
<!-- Colors -->
<link
rel=
"stylesheet"
href=
"../css/red.css"
>
<!-- Skin switcher -->
<!-- Manually link your desire skin -->
</head>
<body>
<div
class=
""
id=
"headers"
>
<!-- Header -->
<div
class=
"contact-us"
>
<div
class=
"container"
>
<div
class=
"row"
>
<div
class=
"col-md-12"
>
<div
class=
"card card-contact"
>
<form
id=
"contactForm"
method=
"post"
novalidate
>
<div
class=
"header header-raised header-primary text-center"
>
<h4
class=
"card-title"
>
Attendance of guest
</h4>
</div>
<div
class=
"card-layer"
></div>
<div
class=
"content"
>
<div
class=
"form-group label-floating"
>
<div
id=
"app"
>
<div
class=
"preview-container"
>
<video
id=
"preview"
></video>
</div>
</div>
<
div
class
="
tab
-
content
p
-
5
bg
-
light
">
<h2 class="
mb
-
4
">Scan Qr code</h2>
<div class="
cards
">
<div class="
cards
-
header
cards
-
chart
" data-background-color="
blue
" style="
padding
:
20
px
">
<div class="
input
-
group
mb
-
3
">
<script type="
text
/
javascript
" src="
https
://
rawgit
.
com
/
schmich
/
instascan
-
builds
/
master
/
instascan
.
min
.
js
"></script>
<video id="
preview
"></video>
<script type="
text
/
javascript
">
let scanner = new Instascan.Scanner({ video: document.getElementById('preview') });
scanner.addListener('scan', function (content) {
console.log(content);
});
Instascan.Camera.getCameras().then(function (cameras) {
if (cameras.length > 0) {
scanner.start(cameras[0]);
} else {
console.error('No cameras found.');
}
}).catch(function (e) {
console.error(e);
});
</script>
</div>
</div>
</div>
<div class="
cards
-
content
">
<h4 class="
title
"></h4>
<div
class=
"row"
>
<p class="
category
"><div class="
form
-
group
">
<section
class=
"scans"
>
<div class="
form
-
check
form
-
check
-
inline
">
<section class="
cameras
">
<h2>Cameras</h2>
<ul>
<li v-if="
cameras
.
length
===
0
" class="
empty
">No cameras found</li>
<li v-for="
camera
in
cameras
">
<span v-if="
camera
.
id
==
activeCameraId
" :title="
formatName
(
camera
.
name
)
" class="
active
"></span>
<span v-if="
camera
.
id
!=
activeCameraId
" :title="
formatName
(
camera
.
name
)
">
<a @click.stop="
selectCamera
(
camera
)
"></a>
</span>
</li>
</ul>
</section>
<section class="
scans
">
<h2>Scans</h2>
<h2>Scans</h2>
<ul v-if="
scans
.
length
===
0
">
<ul v-if="
scans
.
length
===
0
">
<li class="
empty
">No scans yet</li>
<li class="
empty
">No scans yet</li>
...
@@ -75,90 +57,15 @@
...
@@ -75,90 +57,15 @@
<li v-for="
scan
in
scans
" :key="
scan
.
date
" :title="
scan
.
content
"></li>
<li v-for="
scan
in
scans
" :key="
scan
.
date
" :title="
scan
.
content
"></li>
</transition-group>
</transition-group>
</section>
</section>
</div>
<div
class=
"col-md-12"
>
</div></p>
oihohuhuihuihuih
</div>
</div>
</div>
</div>
</form>
</div>
</div>
<!-- <div class="row">
<br>
<br>
</div>
-->
</div>
</div>
</div>
</div>
</section>
</div>
<!-- End Header -->
</div>
</div>
<!-- End contact -->
<!-- Subscribe -->
<!-- End subscribe -->
<!-- Footer -->
<!-- ./Footer section -->
<!-- End footer -->
<!-- Core JS Files -->
<script
type=
"text/javascript"
>
var
app
=
new
Vue
({
el
:
'#app'
,
data
:
{
scanner
:
null
,
activeCameraId
:
null
,
cameras
:
[],
scans
:
[]
},
mounted
:
function
()
{
var
self
=
this
;
self
.
scanner
=
new
Instascan
.
Scanner
({
video
:
document
.
getElementById
(
'preview'
),
scanPeriod
:
5
});
self
.
scanner
.
addListener
(
'scan'
,
function
(
content
,
image
)
{
self
.
scans
.
unshift
({
date
:
+
(
Date
.
now
()),
content
:
content
});
});
Instascan
.
Camera
.
getCameras
().
then
(
function
(
cameras
)
{
self
.
cameras
=
cameras
;
if
(
cameras
.
length
>
0
)
{
self
.
activeCameraId
=
cameras
[
0
].
id
;
self
.
scanner
.
start
(
cameras
[
0
]);
}
else
{
console
.
error
(
'No cameras found.'
);
}
}).
catch
(
function
(
e
)
{
console
.
error
(
e
);
});
},
methods
:
{
formatName
:
function
(
name
)
{
return
name
||
'(unknown)'
;
},
selectCamera
:
function
(
camera
)
{
this
.
activeCameraId
=
camera
.
id
;
this
.
scanner
.
start
(
camera
);
}
}
});
</script>
</body>
</html>
@endsection
resources/views/layouts/scann.blade.php
0 → 100644
View file @
a216581e
routes/web.php
View file @
a216581e
...
@@ -46,6 +46,7 @@ function($app) {
...
@@ -46,6 +46,7 @@ function($app) {
$app
->
get
(
'{slug}/'
,
'EventPageController@index'
);
$app
->
get
(
'{slug}/'
,
'EventPageController@index'
);
$app
->
get
(
'find/{slug}/'
,
'EventPageController@findevent'
);
$app
->
get
(
'find/{slug}/'
,
'EventPageController@findevent'
);
$app
->
get
(
'search/'
,
'HomeController@checkUser'
);
$app
->
get
(
'detail/{slug}'
,
'EventPageController@detail'
);
$app
->
get
(
'detail/{slug}'
,
'EventPageController@detail'
);
$app
->
get
(
'qrscan/{slug}/{email}/{invcode}/'
,
'EventPageController@qrscan'
);
$app
->
get
(
'qrscan/{slug}/{email}/{invcode}/'
,
'EventPageController@qrscan'
);
...
...
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