When I access the login page of my laravel application, I get an Undefined variable: errors (View: D:\PhpstormProjects\laravel\resources\views\login.blade.php) .
According to http://laravel.com/docs/master/validation#error-messages-and-views , $ errors should always be automatically set:
So, it is important to note that the $ errors variable will always be available in all your views, with each request , which allows us to conveniently assume that the $ errors variable is always defined and can be used safely.
This is the click file:
@extends('layouts.master') @section('main') <div id="loginwrapper"> <h2>Please authenticate</h2> @if ($errors->has()) <div id="error"> {{ $errors->first() }} </div> @endif {!! Form::open(['id' => 'loginform', 'name' => 'loginform']) !!} ... Form stuff ... {!! Form::close() !!} </div> @stop
The view is created by simple View::make('login'); I am using laravel 5.0 development version.
Does anyone know the reason for this?
source share