Skip to content

Instantly share code, notes, and snippets.

@nicodevs
Last active June 15, 2017 17:04
Show Gist options
  • Save nicodevs/76986d949dc8e37af1097c6193be26d0 to your computer and use it in GitHub Desktop.
Save nicodevs/76986d949dc8e37af1097c6193be26d0 to your computer and use it in GitHub Desktop.
Laravel 5.4 Auth using Bootstrap 4
@extends('layouts.app')
@section('content')
<div class="container">
<div class="card">
<div class="card-header">
Reset Password
</div>
<div class="card-block">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ route('password.email') }}">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('email') ? ' has-danger' : '' }}">
<label for="email" class="form-control-label">E-Mail Address</label>
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
@if ($errors->has('email'))
<span class="form-control-feedback">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">
Send Password Reset Link
</button>
</div>
</form>
</div>
</div>
</div>
@endsection
@extends('layouts.app')
@section('content')
<div class="container">
<div class="card">
<div class="card-header">
Login
</div>
<div class="card-block">
<form class="form-horizontal" role="form" method="POST" action="{{ route('login') }}">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('email') ? ' has-danger' : '' }}">
<label for="email" class="form-control-label">E-Mail Address</label>
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required autofocus>
@if ($errors->has('email'))
<span class="form-control-feedback">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<label for="password" class="form-control-label">Password</label>
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="form-control-feedback">
<strong>
{{ $errors->first('password') }}
</strong>
</span>
@endif
</div>
<div class="form-check">
<label class="form-radio-check">
<input type="checkbox" name="remember" {{ old('remember') ? 'checked' : '' }}>
Remember Me
</label>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">
Login
</button>
<a class="btn btn-link" href="{{ route('password.request') }}">
Forgot Your Password?
</a>
</div>
</form>
</div>
</div>
</div>
@endsection
@extends('layouts.app')
@section('content')
<div class="container">
<div class="card">
<div class="card-header">
Register
</div>
<div class="card-block">
<form class="form-horizontal" role="form" method="POST" action="{{ route('register') }}">
{{ csrf_field() }}
<div class="form-group{{ $errors->has('name') ? ' has-danger' : '' }}">
<label for="name" class="form-control-label">Name</label>
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}" required autofocus>
@if ($errors->has('name'))
<span class="form-control-feedback">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('email') ? ' has-danger' : '' }}">
<label for="email" class="form-control-label">E-Mail Address</label>
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}" required>
@if ($errors->has('email'))
<span class="form-control-feedback">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<label for="password" class="form-control-label">Password</label>
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="form-control-feedback">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="form-group">
<label for="password-confirm" class="form-control-label">Confirm Password</label>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">
Register
</button>
</div>
</form>
</div>
</div>
</div>
@endsection
@extends('layouts.app')
@section('content')
<div class="container">
<div class="card">
<div class="card-header">
Reset Password
</div>
<div class="card-block">
@if (session('status'))
<div class="alert alert-success">
{{ session('status') }}
</div>
@endif
<form class="form-horizontal" role="form" method="POST" action="{{ route('password.request') }}">
{{ csrf_field() }}
<input type="hidden" name="token" value="{{ $token }}">
<div class="form-group{{ $errors->has('email') ? ' has-danger' : '' }}">
<label for="email" class="form-control-label">E-Mail Address</label>
<input id="email" type="email" class="form-control" name="email" value="{{ $email or old('email') }}" required autofocus>
@if ($errors->has('email'))
<span class="form-control-feedback">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password') ? ' has-danger' : '' }}">
<label for="password" class="form-control-label">Password</label>
<input id="password" type="password" class="form-control" name="password" required>
@if ($errors->has('password'))
<span class="form-control-feedback">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-danger' : '' }}">
<label for="password-confirm" class="form-control-label">Confirm Password</label>
<input id="password-confirm" type="password" class="form-control" name="password_confirmation" required>
@if ($errors->has('password_confirmation'))
<span class="form-control-feedback">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
@endif
</div>
<div class="form-group">
<button type="submit" class="btn btn-primary">
Reset Password
</button>
</div>
</form>
</div>
</div>
</div>
@endsection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment