本文整理汇总了PHP中Illuminate\Contracts\Auth\Authenticatable::fill方法的典型用法代码示例。如果您正苦于以下问题:PHP Authenticatable::fill方法的具体用法?PHP Authenticatable::fill怎么用?PHP Authenticatable::fill使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Contracts\Auth\Authenticatable
的用法示例。
在下文中一共展示了Authenticatable::fill方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: addLdapToModel
/**
* Add Ldap fields to current user model.
*
* @param UserContract $model
* @param adLDAP\collection\adLDAPCollection $ldap
*
* @return UserContract
*/
protected function addLdapToModel($model, $ldap)
{
$combined = $ldap + $model->getAttributes();
return $model->fill($combined);
}
示例2: addLdapToModel
/**
* Add Ldap fields to current user model.
*
* @param UserContract $model
* @param adLDAP\collection\adLDAPCollection $ldap
* @return UserContract
*/
protected function addLdapToModel($model, $ldap)
{
return $model->fill($ldap);
}
示例3: updateUser
/**
* Change the password for a given user
* @param Request $request
* @param Authenticatable $user
* @return Illuminate\Http\Response
*/
protected function updateUser(Request $request, Authenticatable $user)
{
$user->fill($request->all());
return $user->save();
}
示例4: postProfile
/**
* Display the specified resource.
*
* @param Request $request
*
* @return Response
*/
public function postProfile(Request $request, Authenticatable $user)
{
$this->validate($request, ['name' => 'required|min:3']);
$user->fill($request->all());
if ($user->save()) {
return redirect('home')->withMessage('Profile updated successfully.')->withCode(201);
} else {
return redirect()->back()->withMessage('Error while updating profile.')->withCode(400);
}
}