Laravel 5 No CSRF value
<p>I have a simple log in form with a csrf token field. When I submit I get a token mismatch. When I look at the value in the form the value of the token is blank</p>

<p>Both the login form and the authenticate are both in the web middleware group</p>

<pre><code>Route::group(['middleware' =&gt; ['web']],function(){
    Route::get('/login',function(){
        return view('auth.login');
    });

    Route::post('/authenticate_user','Accounts\Accounts@authenticateUser');

    Route::get('/bar',function(){
        return csrf_token(); // works
    });
});
</code></pre>

<p>That bar route does display a token</p>

<pre><code>//login.blade
@section('content')
&lt;div class="row"&gt;
    &lt;div class="col-md-12"&gt;
        &lt;form action="authenticate_user" method="post"&gt;
            &lt;label for="login_name"&gt;User Name&lt;/label&gt;
            &lt;input type="text" id="login_name" name="login_name" required="required"&gt;
            &lt;label for="password"&gt;Password&lt;/label&gt;
            &lt;input type="password" id="password" name="password" required="required"&gt;
            {{ csrf_field() }}
            &lt;br&gt;
            &lt;button type="submit" id="Login" name="login" value="Log In" class="btn btn-default"&gt;Log In&lt;/button&gt;
        &lt;/form&gt;
    &lt;/div&gt;
&lt;/div&gt;
@endsection
</code></pre>

<p>Unfortunately the csrf field value is blank when I look at the source code </p>

<pre><code>&lt;input type="hidden" name="_token" value=""&gt;
</code></pre>

<p>I did clear the laravel session and view storage. I restarted my browser and web server (XAMPP using PHP 7.0.2 on win 7).</p>

<p>I also tried:</p>

<pre><code>&lt;?php
$encrypter = app('Illuminate\Encryption\Encrypter');
$encrypted_token = $encrypter-&gt;encrypt(csrf_token());
?&gt;
&lt;input id="token" type="hidden" value="{{$encrypted_token}}"&gt;
</code></pre>

<p>Got a value but it still mismatched</p>

<p>I am sure I am doing something stupid but I have no idea why I am not getting a token value and mismatch</p>