Description
Hi all ,
first love the work you have done ♥.
PHP : 8.1
Laravel : 9.44.0
Laravel-logger : 6.0
is there any reason by using Request::user()->{$userIdField} instead of Auth::user()->{$userIdField} ?
because when i am donig Auth::login($user) it throw the exception attempt to read property id on null ?.
i think the reason for that is because i am runing Auth::login($user) from a schedual and there is no request binding for the user 🤔.
I have solve it in tow way :
-
the first way by changing Request::user()->{$userIdField} to Auth::user()->{$userIdField} inside vendor file. and i dont really know the consequnces !
-
the other way by using the following code:
$request->setUserResolver(function () {
return $user;
});
if there is no side effects of using Auth::user()->{$userIdField} I am more than happy to make a pull request 😄.