App\Models\User::activeSubscriptions must return a relationship instance.
sajjad-talebi opened this issue · 3 comments
When I want to check the user's active subscription with this method
I am facing the following problem
$user->activeSubscriptions
If I apply with this method, it works correctly
$user->activeSubscriptions()
Can a user have multiple active subscriptions?
If the answer is negative, this method should return boolean
Thanks for your nice package
In theory, it can. Since this package was orginally forked, maybe some things don't work as expected. I'll take a look
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
getting this error, using laravel 10 with laravel-subby v7.0
LogicException: App\Models\User::activeSubscriptions must return a relationship instance. in file /Users/apple/Desktop/php/convertpods-latest/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php on line 583
#0 /Users/apple/Desktop/php/convertpods-latest/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(526): Illuminate\Database\Eloquent\Model->getRelationshipFromMethod('activeSubscript...')
#1 /Users/apple/Desktop/php/convertpods-latest/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Concerns/HasAttributes.php(451): Illuminate\Database\Eloquent\Model->getRelationValue('activeSubscript...')
#2 /Users/apple/Desktop/php/convertpods-latest/vendor/laravel/framework/src/Illuminate/Database/Eloquent/Model.php(2227): Illuminate\Database\Eloquent\Model->getAttribute('activeSubscript...')
#3 /Users/apple/Desktop/php/convertpods-latest/app/Http/Controllers/UserController.php(243): Illuminate\Database\Eloquent\Model->__get('activeSubscript...')
Any luck on resolving this?