Commit af95d707 by hfpp2012 yinsigan

Social Network Login with Username

1 parent 16798fae
...@@ -36,4 +36,9 @@ class LoginController extends Controller ...@@ -36,4 +36,9 @@ class LoginController extends Controller
{ {
$this->middleware('guest')->except('logout'); $this->middleware('guest')->except('logout');
} }
public function username()
{
return 'username';
}
} }
...@@ -10,15 +10,15 @@ ...@@ -10,15 +10,15 @@
<form class="form-horizontal" method="POST" action="{{ route('login') }}"> <form class="form-horizontal" method="POST" action="{{ route('login') }}">
{{ csrf_field() }} {{ csrf_field() }}
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}"> <div class="form-group{{ $errors->has('username') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail Address</label> <label for="username" class="col-md-4 control-label">UserName</label>
<div class="col-md-6"> <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"> <span class="help-block">
<strong>{{ $errors->first('email') }}</strong> <strong>{{ $errors->first('username') }}</strong>
</span> </span>
@endif @endif
</div> </div>
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!