我的字段不反映在数据库中只有城市,课程和第二名
my fields not reflecting in the databse only for city, course and secon name
数据库显示其他条目
这是我在注册视图中的代码。对于名字,除了课程,城市,第二个名字没有显示在数据库中,同时它允许我登录。我试过改变一些东西,但仍然没有反射
<form class="form-horizontal" role="form" method="POST" action="{{ url('/register') }}">
{{ csrf_field() }} first name,
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="name" class="col-md-4 control-label">First Name</label>
<div class="col-md-6">
<input id="name" type="text" class="form-control" name="name" value="{{ old('name') }}">
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="second" class="col-md-4 control-label">Second Name</label>
<div class="col-md-6">
<input id="second" type="text" class="form-control" name="second" value="{{ old('name') }}">
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="city" class="col-md-4 control-label">City</label>
<div class="col-md-6">
<input id="city" type="text" class="form-control" name="city" value="{{ old('name') }}">
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('name') ? ' has-error' : '' }}">
<label for="course" class="col-md-4 control-label">course</label>
<div class="col-md-6">
<input id="course" type="text" class="form-control" name="course" value="{{ old('name') }}">
@if ($errors->has('name'))
<span class="help-block">
<strong>{{ $errors->first('name') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('email') ? ' has-error' : '' }}">
<label for="email" class="col-md-4 control-label">E-Mail Address</label>
<div class="col-md-6">
<input id="email" type="email" class="form-control" name="email" value="{{ old('email') }}">
@if ($errors->has('email'))
<span class="help-block">
<strong>{{ $errors->first('email') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password') ? ' has-error' : '' }}">
<label for="password" class="col-md-4 control-label">Password</label>
<div class="col-md-6">
<input id="password" type="password" class="form-control" name="password">
@if ($errors->has('password'))
<span class="help-block">
<strong>{{ $errors->first('password') }}</strong>
</span>
@endif
</div>
</div>
<div class="form-group{{ $errors->has('password_confirmation') ? ' has-error' : '' }}">
<label for="password-confirm" class="col-md-4 control-label">Confirm Password</label>
<div class="col-md-6">
<input id="password-confirm" type="password" class="form-control" name="password_confirmation">
@if ($errors->has('password_confirmation'))
<span class="help-block">
<strong>{{ $errors->first('password_confirmation') }}</strong>
</span>
@endif
</div>
</div>
authcontroller
protected function validator(array $data)
{
return Validator::make($data, [
'name' => 'required|max:255',
'email' => 'required|email|max:255|unique:users',
'password' => 'required|min:6|confirmed',
]);
}
/**
* Create a new user instance after a valid registration.
*
* @param array $data
* @return User
*/
protected function create(array $data)
{
return User::create([
'name' => $data['name'],
'email' => $data['email'],
'password' => bcrypt($data['password']),
]);
}
进入用户模型。搜索变量
protected $fillable
相关文章:
- 下拉选择可自动更改第二个下拉选择
- 在哪里使用名为“;冻结”;
- Javascript(Angular)从一个对象数组到第二个数组查找值
- 从城市名称获取惊喜
- AngularJS-在JSON选择器中使用变量名
- TableExport jquery插件:文件名和扩展名问题
- 从html创建一个指令,该指令按类名应用函数
- 为什么不'在JQuery中找到第二个css选择器的工作
- 州和城市选择框类似于国家细分页面
- 当单击第一个李时,它显示内容一,当单击第二个李时,它显示内容二
- 更改类名后,将第二次单击事件附加到元素
- 从iframe中选择具有相同类名的两个DIV中的第二个
- XPath如何查找具有CSS类名的第二个元素
- jQueryDataTables头上有两行:第一行列名和排序,第二行过滤
- Eloquent Javascript第二名.第4章.计算相关性.Lycarthorpe的日志-〔定义的索引〕第1部分
- 我们如何使用类名通过它在 Jquery 中的位置获取第二个元素
- 从单节点进程提供两个https主机名&港口城市
- 从JavaScript中的第二个变量获取名为的变量的值
- 如何获得第二名?“;在扫描器中使用indexOf
- 我的字段不反映在数据库中只有城市,课程和第二名