You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have an issue with spatie v3.16 while using a custom Model. Although my model is implementing and extending the proper interface and super class but I am receiving the error which reads as:
The given model class `App\Models\V1\Activity` does not implement `Spatie\Activitylog\Contracts\Activity` or it does not extend `Illuminate\Database\Eloquent\Model`
This is my model which I have extended/implemented the needed classes.
use Illuminate\Support\Arr;
use Illuminate\Support\Collection;
use Illuminate\Database\Eloquent\Model;
use Jenssegers\Mongodb\Eloquent\Model as Eloquent;
use Illuminate\Database\Eloquent\Builder;
use Illuminate\Database\Eloquent\Relations\MorphTo;
use Spatie\Activitylog\Contracts\Activity as ActivityContract;
class Activity extends Eloquent implements ActivityContract
...
Also, I should mention that, I am using mongodb as target database to record the activity logs and my php version is 7.4.13.
Can someone take a look into the issue why it says that the custom model is not implementing or extending the related classes?
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
-
Hello all,
I have an issue with spatie v3.16 while using a custom Model. Although my model is implementing and extending the proper interface and super class but I am receiving the error which reads as:
This is my model which I have extended/implemented the needed classes.
Also, I should mention that, I am using mongodb as target database to record the activity logs and my php version is 7.4.13.
Can someone take a look into the issue why it says that the custom model is not implementing or extending the related classes?
Thanks in advance.
Beta Was this translation helpful? Give feedback.
All reactions