Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Create a master file base.blade.php inside your views/layouts folder:</p> <pre><code>&lt;!DOCTYPE html&gt; &lt;html lang="en"&gt; &lt;head&gt; &lt;meta charset="utf-8"&gt; &lt;meta name="viewport" content="width=device-width, initial-scale=1.0"&gt; &lt;meta name="description" content=""&gt; &lt;title&gt;Signin&lt;/title&gt; &lt;link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap.min.css"&gt; &lt;link rel="stylesheet" href="//netdna.bootstrapcdn.com/bootstrap/3.0.0/css/bootstrap-theme.min.css"&gt; &lt;script src="//netdna.bootstrapcdn.com/bootstrap/3.0.0/js/bootstrap.min.js"&gt;&lt;/script&gt; &lt;style&gt; body { background-color: #EEEEEE; padding-bottom: 40px; padding-top: 40px; } .form-signin { margin: 0 auto; max-width: 330px; padding: 15px; } .form-signin .form-signin-heading, .form-signin .checkbox { margin-bottom: 10px; } &lt;/style&gt; &lt;/head&gt; &lt;body&gt; &lt;div class="container"&gt; @section('maincontent') @show &lt;/div&gt; &lt;/body&gt; &lt;/html&gt; </code></pre> <p>And then in your login.blade.php:</p> <pre><code>@extends('layouts.base') @section('maincontent') &lt;form class="form-signin" action="/login" method="POST" &gt; @if ($errors-&gt;first('login')) &lt;div class="alert alert-danger" &gt; {{$errors-&gt;first('login')}} &lt;/div&gt; @endif @if ($errors-&gt;first('password')) &lt;div class="alert alert-danger" &gt; {{$errors-&gt;first('password')}} &lt;/div&gt; @endif @if(Session::has('flash_notice')) &lt;div class="alert alert-danger" &gt; {{Session::get('flash_notice')}} &lt;/div&gt; @endif @if(Session::has('flash_success')) &lt;div class="alert alert-success" &gt; {{Session::get('flash_success')}} &lt;/div&gt; @endif &lt;h2 class="form-signin-heading"&gt;Please sign in&lt;/h2&gt; &lt;input type="text" class="form-control" placeholder="Login" name="login" autofocus&gt; &lt;input type="password" class="form-control" placeholder="Password" name="password" &gt; &lt;label class="checkbox"&gt;&lt;/label&gt; &lt;button class="btn btn-lg btn-primary btn-block" type="submit"&gt;Sign in&lt;/button&gt; &lt;/form&gt; @stop </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload