mirror of
https://github.com/nothingworksinc/ticketbeast.git
synced 2026-01-26 11:14:06 +00:00
(add login form)
This commit is contained in:
@@ -8,6 +8,11 @@ use Illuminate\Foundation\Auth\AuthenticatesUsers;
|
||||
|
||||
class LoginController extends Controller
|
||||
{
|
||||
public function showLoginForm()
|
||||
{
|
||||
return view('auth.login');
|
||||
}
|
||||
|
||||
public function login()
|
||||
{
|
||||
if (! Auth::attempt(request(['email', 'password']))) {
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
@text-brand: hsv(@hue-brand-primary, 100%, 86%);
|
||||
@text-brand-soft: hsv(@hue-brand-primary, 85%, 86%);
|
||||
@text-brand-muted: hsv(@hue-brand-primary, 65%, 86%);
|
||||
|
||||
@text-danger: @color-danger;
|
||||
|
||||
small {
|
||||
font-size: @font-size-sm;
|
||||
|
||||
@@ -21,6 +21,7 @@
|
||||
.text-brand { color: @text-brand; }
|
||||
.text-brand-soft { color: @text-brand-soft; }
|
||||
.text-brand-muted { color: @text-brand-muted; }
|
||||
.text-danger { color: @text-danger; }
|
||||
|
||||
.text-em { font-style: italic; }
|
||||
|
||||
|
||||
38
resources/views/auth/login.blade.php
Normal file
38
resources/views/auth/login.blade.php
Normal file
@@ -0,0 +1,38 @@
|
||||
@extends('layouts.master')
|
||||
|
||||
@section('body')
|
||||
<div class="container-fluid bg-soft">
|
||||
<div class="full-height flex-center">
|
||||
<div class="constrain constrain-sm flex-fit">
|
||||
<form class="card p-xs-6" action="/login" method="POST">
|
||||
{{ csrf_field() }}
|
||||
<h1 class="text-xl wt-light text-center m-xs-b-6">Log in to your account</h1>
|
||||
<div class="form-group">
|
||||
<label class="form-label pseudo-hidden">Email address</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
@icon('user', 'text-dark-muted text-xs')
|
||||
</span>
|
||||
<input type="email" name="email" class="form-control" placeholder="Email address" value="{{ old('email') }}">
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group">
|
||||
<label class="form-label pseudo-hidden">Password</label>
|
||||
<div class="input-group">
|
||||
<span class="input-group-addon">
|
||||
@icon('lock-closed', 'text-dark-muted text-xs')
|
||||
</span>
|
||||
<input type="password" name="password" class="form-control" placeholder="Password">
|
||||
</div>
|
||||
</div>
|
||||
<button type="submit" class="btn btn-block btn-primary">Log in</button>
|
||||
@if($errors->any())
|
||||
<p class="text-center text-danger m-xs-t-2">
|
||||
These credentials do not match our records.
|
||||
</p>
|
||||
@endif
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
@endsection
|
||||
@@ -15,4 +15,5 @@ Route::get('/concerts/{id}', 'ConcertsController@show');
|
||||
Route::post('/concerts/{id}/orders', 'ConcertOrdersController@store');
|
||||
Route::get('/orders/{confirmationNumber}', 'OrdersController@show');
|
||||
|
||||
Route::get('/login', 'Auth\LoginController@showLoginForm');
|
||||
Route::post('/login', 'Auth\LoginController@login');
|
||||
|
||||
Reference in New Issue
Block a user