Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
Toggle navigation
This project
Loading...
Sign in
hfpp2012
/
laravel-blog
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit af95d707
authored
Sep 08, 2017
by
hfpp2012 yinsigan
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
Social Network Login with Username
1 parent
16798fae
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
5 deletions
app/Http/Controllers/Auth/LoginController.php
resources/views/auth/login.blade.php
app/Http/Controllers/Auth/LoginController.php
View file @
af95d70
...
...
@@ -36,4 +36,9 @@ class LoginController extends Controller
{
$this
->
middleware
(
'guest'
)
->
except
(
'logout'
);
}
public
function
username
()
{
return
'username'
;
}
}
resources/views/auth/login.blade.php
View file @
af95d70
...
...
@@ -10,15 +10,15 @@
<form
class=
"form-horizontal"
method=
"POST"
action=
"{{ route('login') }}"
>
{{ csrf_field() }}
<div
class=
"form-group{{ $errors->has('
email
') ? ' has-error' : '' }}"
>
<label
for=
"
email"
class=
"col-md-4 control-label"
>
E-Mail Address
</label>
<div
class=
"form-group{{ $errors->has('
username
') ? ' has-error' : '' }}"
>
<label
for=
"
username"
class=
"col-md-4 control-label"
>
UserName
</label>
<div
class=
"col-md-6"
>
<input
id=
"
email"
type=
"email"
class=
"form-control"
name=
"email"
value=
"{{ old('email
') }}"
required
autofocus
>
<input
id=
"
username"
type=
"text"
class=
"form-control"
name=
"username"
value=
"{{ old('username
') }}"
required
autofocus
>
@if ($errors->has('
email
'))
@if ($errors->has('
username
'))
<span
class=
"help-block"
>
<strong>
{{ $errors->first('
email
') }}
</strong>
<strong>
{{ $errors->first('
username
') }}
</strong>
</span>
@endif
</div>
...
...
Write
Preview
Markdown
is supported
Attach a file
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 post a comment