Skip to content

tap() function returns error #931

Answered by Gummibeer
yangshengjie4u asked this question in Q&A
Discussion options

You must be logged in to vote

Hey,
yes your tap() call is too late in the fluent chain. The log() method doesn't return an instance of the ActivityLogger anymore but an instance of the Activity model. So you aren't calling our ActivityLogger::tap() method but the Laravel Core/Eloquent Model one.

public function log(string $description): ?ActivityContract
{
if ($this->logStatus->disabled()) {
return null;
}
$activity = $this->activity;
$activity->description = $this->replacePlaceholders(
$activity->description ?? $description,
$activity
);
$activity->save();
$this->

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@yangshengjie4u
Comment options

Answer selected by yangshengjie4u
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants