Skip to content

Commit

Permalink
updated Deafult qr code
Browse files Browse the repository at this point in the history
  • Loading branch information
Roland Alla MAC committed Jun 5, 2017
1 parent c98d2e4 commit fcc942a
Show file tree
Hide file tree
Showing 6 changed files with 97 additions and 117 deletions.
5 changes: 0 additions & 5 deletions app/User.php
Expand Up @@ -84,11 +84,6 @@ public function sendPasswordResetNotification($token)
{
$this->notify(new ResetPassword($token));
}
public function setFirstNameAttribute($value)
{
$this->attributes['QRpassword'] = bcrypt($this->email.str_random(40));
}

//End change password


Expand Down
Expand Up @@ -97,7 +97,7 @@ public function up()
$table->increments('id');
$table->string('email');
$table->string('password');
$table->string('QRpassword');
$table->string('QRpassword')->default(str_random(40));
$table->text('permissions')->nullable();
$table->timestamp('last_login')->nullable();
$table->string('first_name')->nullable();
Expand Down
4 changes: 2 additions & 2 deletions resources/views/auth/QrLogin.blade.php
Expand Up @@ -11,7 +11,7 @@
<div class="col-md-2">
</div>
<div class="col-md-8">
@if( !Sentinel::getUser())
@if(!Sentinel::getUser())
<div class="row">
<div id="reader" class="center-block" style="width:300px;height:250px">
</div>
Expand All @@ -21,7 +21,7 @@
</div>
</div>
@else
<h1>Hallo! {{Sentinel::getUser()->name}}</h1>
<h1>Hallo! {{Sentinel::getUser()->first_name}}</h1>
@endif
</div>
<div class="col-md-2">
Expand Down
65 changes: 60 additions & 5 deletions resources/views/frontLayout/app.blade.php
Expand Up @@ -11,11 +11,65 @@
<link href="//cdn.datatables.net/1.10.15/css/jquery.dataTables.min.css" rel="stylesheet">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.6.1/css/font-awesome.min.css">
<link href="css/style.css" rel="stylesheet">
<style>
body {
<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">

<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Raleway', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
body {
padding-top: 70px;
}
</style>
</style>
@yield('style')
</head>
<body>
Expand All @@ -39,8 +93,9 @@
<li><a href="{{ url('qrLogin') }}">Qr Login</a></li>
<li><a href="{{ url('register') }}">Register</a></li>
@else
<li><a href="#">{{ Auth::user()->name }}</a></li>
<li><a href="{{ url('logout') }}">Logout</a></li>
<a href="{{ url('/') }}">Home</a>
<a href="{{url('my-qrcode')}}">My Qr Code</a>
<a href="{{url('user/logout/now')}}">Logout</a>
@endif
</ul>
</div>
Expand Down
137 changes: 33 additions & 104 deletions resources/views/welcome.blade.php
@@ -1,105 +1,34 @@
<!DOCTYPE html>
<html lang="{{ config('app.locale') }}">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">

<title>Laravel</title>

<!-- Fonts -->
<link href="https://fonts.googleapis.com/css?family=Raleway:100,600" rel="stylesheet" type="text/css">

<!-- Styles -->
<style>
html, body {
background-color: #fff;
color: #636b6f;
font-family: 'Raleway', sans-serif;
font-weight: 100;
height: 100vh;
margin: 0;
}
.full-height {
height: 100vh;
}
.flex-center {
align-items: center;
display: flex;
justify-content: center;
}
.position-ref {
position: relative;
}
.top-right {
position: absolute;
right: 10px;
top: 18px;
}
.content {
text-align: center;
}
.title {
font-size: 84px;
}
.links > a {
color: #636b6f;
padding: 0 25px;
font-size: 12px;
font-weight: 600;
letter-spacing: .1rem;
text-decoration: none;
text-transform: uppercase;
}
.m-b-md {
margin-bottom: 30px;
}
</style>
</head>
<body>
<div class="flex-center position-ref full-height">
@if (Route::has('login'))
<div class="top-right links">
@if (Sentinel::check())
<a href="{{ url('/') }}">Home</a>
{!! Form::open(['url' => url('logout'),'class'=>'form-inline']) !!}
{!! csrf_field() !!}
<button class="btn btn-primary btn-lg btn-block register-button" type="submit" >Logout</button>
{!! Form::close() !!}

@else
<a href="{{ url('/login') }}">Login</a>
<a href="{{ url('/qrLogin') }}">Qr Login</a>
<a href="{{ url('/register') }}">Register</a>
@endif
</div>
@endif

<div class="content">
<div class="title m-b-md">
Laravel Starter page

</div>
@if (Sentinel::check() )
Your name : {{Sentinel::getUser()->first_name}} <br>
Last name : {{Sentinel::getUser()->last_name}} <br>
E-mail : {{Sentinel::getUser()->email}} <br>
@endif

<div class="links">
<a href="https://github.com/roladn">GitHub</a>
<a href="https://rolandalla.com/">Roland Alla</a>
<a href="https://www.facebook.com/rolandalla91">Facebook</a>
</div>
</div>
</div>
</body>
</html>
@extends('frontLayout.app')
@section('title')
Home Page
@stop

@section('style')

@stop
@section('content')
<div class="content">
<div class="title m-b-md">
Laravel Qr Code Starter page

</div>
@if (Sentinel::check() )
Your name : {{Sentinel::getUser()->first_name}} <br>
Last name : {{Sentinel::getUser()->last_name}} <br>
E-mail : {{Sentinel::getUser()->email}} <br>
@endif

<div class="links">
<a href="https://github.com/roladn">GitHub</a>
<a href="https://rolandalla.com/">My Website</a>
<a href="https://www.facebook.com/rolandalla91">Facebook</a>
<a href="https://www.youtube.com/channel/UCgW6jORopjpon_42vzi7YkQ">Youtube</a>
</div>
</div>
@endsection

@section('scripts')


@endsection
1 change: 1 addition & 0 deletions routes/web.php
Expand Up @@ -20,6 +20,7 @@
Route::get('dashboard', ['uses' => 'HomeController@dashboard', 'as' => 'home.dashboard']);
//users
Route::resource('user', 'UserController');
Route::get('user/logout/now', ['uses' => 'Auth\LoginController@logout']);
Route::get('user/{user}/permissions', ['uses' => 'UserController@permissions', 'as' => 'user.permissions']);
Route::post('user/{user}/save', ['uses' => 'UserController@save', 'as' => 'user.save']);
Route::get('user/{user}/activate', ['uses' => 'UserController@activate', 'as' => 'user.activate']);
Expand Down

0 comments on commit fcc942a

Please sign in to comment.