Skip to content

Instantly share code, notes, and snippets.

@mercuryseries
Created September 26, 2016 06:51
Show Gist options
  • Save mercuryseries/2e65f6aaee8fe5cade40b2ee49b93d73 to your computer and use it in GitHub Desktop.
Save mercuryseries/2e65f6aaee8fe5cade40b2ee49b93d73 to your computer and use it in GitHub Desktop.
Basic Authentication Laravel Register/Login Views [Example]
<!-- Login View -->
<form action="/login" method="POST">
{{ csrf_field() }}
<input type="email" name="email" placeholder="email"><br>
<input type="password" name="password" placeholder="password"><br>
<input type="submit">
</form>
<!-- End Login View -->
<!-- Register View -->
@if(count($user->getErrorMessages()) > 0)
<ul>
@foreach($user->getErrorMessages() as $error)
<li>{{ $error }}</li>
@endforeach
</ul>
@endif
<form action="/register" method="POST">
{{ csrf_field() }}
<input type="text" name="name" placeholder="name"><br>
<input type="email" name="email" placeholder="email"><br>
<input type="password" name="password" placeholder="password"><br>
<input type="password" name="password_confirmation" placeholder="password confirmation"><br>
<input type="submit">
</form>
<!-- End Register View -->
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment