When using its login & registration function in laravel5.2, no jump occurs after the registration page is submitted.
给我你的怀抱
给我你的怀抱 2017-05-16 16:53:53
0
2
648

In laravel5.2, I used its login registration function to write a registration and login function, but the strange thing is that the registration page does not jump after submission. Why?
This is the code for my 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');

This is the code of my register.php:
@extends('app')
@section('content')

{!! Form::open(['url'=>'/auth/register']) !!} 

{!! Form::label('name','Name:') !!} {!! Form::text('name',null,['class'=>'form-control']) !!}

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

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

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


{!! Form::submit('注册',['class'=>'btn btn-primary form-control']) !!} {!! Form::close() !!}


@stop
According to the Internet, even if protected $redirectPath='specified page path' is not added to AuthController.php, you should jump to laravel's home page That's right. The problem is that it doesn't even jump, and the data is not received in the database. what's going on? Please help me take a look.I am a newcomer, thank you all in advance!
According to the method on the Internet, I added protected $redirectPath='/articles'; in AuthController.php and it did not jump to the articles page.

给我你的怀抱
给我你的怀抱

reply all (2)
给我你的怀抱

Add a 'method'=>'POST' to the form and try.

    習慣沉默

    Excuse me, has it been solved?

      Latest Downloads
      More>
      Web Effects
      Website Source Code
      Website Materials
      Front End Template
      About us Disclaimer Sitemap
      php.cn:Public welfare online PHP training,Help PHP learners grow quickly!