本文整理匯總了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);
}
}