We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Because auth()->user() can return null we can't call isReactedBy method without checking for the first argument is not null.
auth()->user()
null
isReactedBy
@if (auth()->check() && $post->viaLoveReactant()->isReactedBy(auth()->user(), 'Like'))
We can check for the null value inside of the facade method.
@if ($post->viaLoveReactant()->isReactedBy(auth()->user(), 'Like'))
$reactantFacade->isReactedBy( Reacterable $reacterable, ?string $reactionTypeName = null ); $reactantFacade->isNotReactedBy( Reacterable $reacterable, ?string $reactionTypeName = null );
$reactantFacade->isReactedBy( ?Reacterable $reacterable = null, ?string $reactionTypeName = null ); $reactantFacade->isNotReactedBy( ?Reacterable $reacterable = null, ?string $reactionTypeName = null );
The text was updated successfully, but these errors were encountered:
Successfully merging a pull request may close this issue.
Motivation
Because
auth()->user()
can returnnull
we can't callisReactedBy
method without checking for the first argument is notnull
.We can check for the
null
value inside of the facade method.Current Implementation
New Implementation
The text was updated successfully, but these errors were encountered: