Warning: file_get_contents(/data/phpspider/zhask/data//catemap/3/sockets/2.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php Laravel 5.1身份验证不起作用_Php_Laravel_Authentication_Eloquent - Fatal编程技术网

Php Laravel 5.1身份验证不起作用

Php Laravel 5.1身份验证不起作用,php,laravel,authentication,eloquent,Php,Laravel,Authentication,Eloquent,我刚接触Laravel5.1,我开始用它建立博客。但是有一个问题。我的用户在注册后无法登录 一件事是,当他们注册时,他们会自动登录,但之后(在他们注销后),他们就不能再登录了 出现的错误消息是电子邮件字段是必需的。无论您在电子邮件字段中输入了什么,它仍然需要返回电子邮件字段 这是登录表单,我使用的是illumb/Html包 @extends('main') @section('title') Login @stop @section('content') <div class=

我刚接触Laravel5.1,我开始用它建立博客。但是有一个问题。我的用户在注册后无法登录

一件事是,当他们注册时,他们会自动登录,但之后(在他们注销后),他们就不能再登录了

出现的错误消息是电子邮件字段是必需的。无论您在电子邮件字段中输入了什么,它仍然需要返回电子邮件字段

这是登录表单,我使用的是illumb/Html包

@extends('main')

@section('title')

Login 

@stop

@section('content')

<div class="row">
<h1>Please Login</h1>

<hr>
</div>

{!! Form::open() !!}
<div class="row">
    <div class="large-6 columns">
        {!! Form::label('email', 'Username:') !!}
        {!! Form::text('email', null, [ 'placeholder' => 'Enter your email']) !!}
    </div>
</div>

<div class="row">
    <div class="large-6 columns">
        {!! Form::label('password', 'Password:') !!}
        {!! Form::password('password', null, [ 'placeholder' => 'Enter Password']) !!}
    </div>
</div>

<div class="row">
    <div class="large-6 columns">
        {!! Form::checkbox('remember') !!}
        {!! Form::label('remember', 'Remembe Me') !!}
    </div>
</div>

<div class="row">
    <div class="large-6 columns">
        {!! Form::submit('Login', [ 'class' => 'expand radius button']) !!}
    </div>
</div>

@if($errors->any())
<div class="row">
    <div class="large-6 columns">
        <ul class="errors">

            @foreach($errors->all() as $error)
                <li>{{ $error }}</li>
            @endforeach
        </ul>
    </div>
</div>
@endif
{!! Form::close() !!}

 @stop
@extends('main'))
@章节(“标题”)
登录
@停止
@节(“内容”)
请登录

{!!Form::open()!!} {!!Form::label('email','Username:') {!!Form::text('email',null,['placeholder'=>'输入您的电子邮件]]) {!!Form::label('password','password:') {!!Form::password('password',null,['placeholder'=>'输入密码'])!!} {!!Form::checkbox('memory')!!} {!!Form::label(‘记住’、‘记住我’) {!!表单::提交('Login',['class'=>'展开半径按钮]) @如果($errors->any())
    @foreach($errors->all()作为$error)
  • {{$error}}
  • @endforeach
@恩迪夫 {!!Form::close()!!} @停止

谢谢您的时间。

如果您正在使用身份验证 改变


显示登录表单我编辑了我的问题@Nehalis,页面错误?产生的错误来自内置的laravel错误method@GideonAppoh您是否尝试使用空字符串(
'
)而不是显式地将
电子邮件
密码
字段的默认值设置为
?不是100%确定,但是有东西告诉我表单助手不喜欢那里的
null
s。
Form::open() 
 {{Form::open(array('url' => 'auth/login', 'method' => 'post'))}}