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() !!}
Add a 'method'=>'POST' to the form and try.
Excuse me, has it been solved?