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
When trying to find a model using a hash id that doesn't exist, this exception is thrown:
Undefined array key 0
The function that is called can return the following values:
@return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null
Which is then accessed:
return $generator->decode($hashIdInstance->hashIdForKey)[0];
When a model can't be found, I suggest a null being returned instead.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
When trying to find a model using a hash id that doesn't exist, this exception is thrown:
Undefined array key 0
The function that is called can return the following values:
@return \Illuminate\Database\Eloquent\Model|\Illuminate\Database\Eloquent\Collection|static[]|static|null
Which is then accessed:
return $generator->decode($hashIdInstance->hashIdForKey)[0];
When a model can't be found, I suggest a null being returned instead.
The text was updated successfully, but these errors were encountered: