beyondcode / beyondcode/invoker-community

Unable to resolve the related model for relation: reactions (Spatie package?)

Open
#330 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
No language data
Stars
76
Forks
1
PR merge metrics
No merged PRs in 30d

Description

------
**OS**: darwin
**Invoker Version**: 2.11.0
**Laravel Version**: 9.51.0
**Local project**: true
**PHP Binary**: /opt/homebrew/bin/php
**Route**: /mails/details?class=App%5CMail%5CPasswordResetMailable&project=local-t98NCT4vrvNchhCoHrLk7s

**Error**:
```
Exception

Unable to resolve the related model for relation: reactions
Please add @relatedModel doc block.

at phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/RelatedModelItem.php:43
39▕ $phpdoc = new \_HumbugBox8e7f5be646a5\Barryvdh\Reflection\DocBlock($reflection, $context);
40▕ if ($phpdoc->hasTag('relatedModel')) {
41▕ $model = $phpdoc->getTagsByName('relatedModel')[0]->getContent();
42▕ } else {
➜ 43▕ throw new \Exception('Unable to resolve the related model for relation: ' . $reflection->getName() . '
44▕ Please add @relatedModel doc block.');
45▕ }
46▕ return $model;
47▕ }

1 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/RelatedModelItem.php:31
_HumbugBox8e7f5be646a5\Invoker\Factories\RelatedModelItem::getRelatedModelFromDocBlock(Object(ReflectionMethod))

2 phar:/Applications/Invoker.app/Contents/Resources/invoker.phar/src/Factories/RelatedModelItem.php:23
_HumbugBox8e7f5be646a5\Invoker\Factories\RelatedModelItem::getRelatedModel(Object(ReflectionMethod), Object(App\Models\User))
```

I have a feeling this relates to using Spatie\Comments as that's the only place I can find which uses a relation reactions.

Any ideas?

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.