0
У меня возникли проблемы с передачей электронной почты Sentry User на мой db. Я могу успешно передать идентификатор пользователя, но не адрес электронной почты.Laravel Sentry getUser-> email
public static function loggedInUser()
{
$user = Sentry::getUser();
if (isset($user))
{
return $user;
}
}
public static function loggedInUserEmail()
{
$user = Sentry::getUser();
$email = $user->email;
if (isset($email))
{
return $email;
}
}
public function store()
{
$id = Helpers::loggedInUser()->id; // this works
$email = Helpers::loggedInUserEmail()->email(); //i have tried also
$email = Helpers::loggedInUserEmail()->email; //i have tried also
$email = Helpers::loggedInUser()->email; //i have tried also
$email = Helpers::loggedInUser()->email(); //i have tried also
$input['email'] = $email;
$input['creator_id'] = $id;
$this->actor->create($input);
}