首页 > laravel5.2中使用它的登录&注册功能时,注册页面提交后没有发生跳转

laravel5.2中使用它的登录&注册功能时,注册页面提交后没有发生跳转

laravel5.2中使用它的登录注册功能写了个注册登录的功能,但奇怪的是注册页面在提交后没有发生跳转是怎么回事?
这是我的routes.php的代码:

   //认证路由
   Route::get('auth/login', 'Auth\AuthController@getLogin');
   Route::post('auth/login', 'Auth\AuthController@postLogin');
   // 注册路由...
   Route::get('auth/register', 'Auth\AuthController@getRegister');
   Route::post('auth/register', 'Auth\AuthController@postRegister');
   
   Route::get('auth/logout', 'Auth\AuthController@getLogout');

这是我的register.php的代码:
@extends('app')
@section('content')
<div class="col-md-4 col-md-offset-4">

{!! Form::open(['url'=>'/auth/register']) !!}
<div>
    {!! Form::label('name','Name:') !!}
    {!! Form::text('name',null,['class'=>'form-control']) !!}
</div>

<div>
    {!! Form::label('email','Email:') !!}
    {!! Form::email('email',null,['class'=>'form-control']) !!}
</div>

<div>
    {!! Form::label('password','Password:') !!}
    {!! Form::password('password',['class'=>'form-control']) !!}
</div>

<div>
    {!! Form::label('password_confirmation','Password:') !!}
    {!! Form::password('password_confirmation',['class'=>'form-control']) !!}
</div>
<br/>
{!! Form::submit('注册',['class'=>'btn btn-primary form-control']) !!}
{!! Form::close() !!}

</div>
@stop
按照网上的说法,即使是没有在AuthController.php中加上 protected $redirectPath='指定页路径',也应该跳转到laravel的home页才对。问题是它连跳转都不跳转,数据库内也没有接到数据。是怎么回事?求各位帮忙看看。新人一个,提前先谢谢大家!
根据网上的方法,我在AuthController.php中加上 protected $redirectPath='/articles';也没有跳转到articles页。


form里加一个'method'=>'POST' 试试。

【热门文章】
【热门文章】