<form
method="POST"
action="/register"
>
<TextField
name="name"
label="用户名"
onChange={event => this.setState({name: event.target.value})}
value={this.state.name}
fullWidth
margin="normal"
/>
<TextField
name="email"
label="邮箱或手机号"
onChange={event => this.setState({email: event.target.value})}
value={this.state.email}
fullWidth
margin="normal"
/>
<TextField
name="password"
label="密码"
type="password"
onChange={event => this.setState({password: event.target.value})}
value={this.state.password}
fullWidth
margin="normal"
/>
<TextField
name="password_confirmation"
label="确认密码"
type="password"
onChange={event => this.setState({password_confirmation: event.target.value})}
value={this.state.password_confirmation}
fullWidth
margin="normal"
/>
<Button raised color="primary" type="submit">注册</Button>
</form>
这个是
csrf token
判断而来的错误你可以在
App\Http\Middleware\VerifyCsrfToken
中设置取消CSRF 验证,当然这是不推荐的。csrf token
信息, 参考手册CSRF Protection