本文整理汇总了PHP中Illuminate\Auth\AuthManager::once方法的典型用法代码示例。如果您正苦于以下问题:PHP AuthManager::once方法的具体用法?PHP AuthManager::once怎么用?PHP AuthManager::once使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类Illuminate\Auth\AuthManager
的用法示例。
在下文中一共展示了AuthManager::once方法的3个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: byCredentials
/**
* Check a user's credentials
*
* @param array $credentials
* @return bool
*/
public function byCredentials(array $credentials = [])
{
try {
$this->fellowshipOneAuth($credentials['email'], $credentials['password']);
return $this->byId();
} catch (Exception $e) {
return false;
}
dd('byCredentials');
return $this->auth->once($credentials);
}
示例2: store
/**
* Log in the user.
*
* @return \Response
*/
public function store()
{
$input = Input::only('email', 'password');
$remember = Input::has('remember');
$this->logInForm->validate($input);
if (!$this->auth->once($input)) {
return json(['errors' => trans('errors.credentials')]);
}
if (!$this->auth->user()->confirmed) {
return json(['errors' => trans('errors.not_confirmed')]);
}
$this->auth->login($this->auth->user(), $remember);
return json(true);
}
示例3: byCredentials
/**
* Check a user's credentials.
*
* @param array $credentials
* @return bool
*/
public function byCredentials(array $credentials = [])
{
return $this->auth->once($credentials);
}