Skip to content
This repository has been archived by the owner on May 26, 2023. It is now read-only.

App\Models\User::activeSubscriptions must return a relationship instance. #146

Open
sajjad-talebi opened this issue Nov 8, 2022 · 3 comments
Labels
bug Something isn't working

Comments

@sajjad-talebi
Copy link

When I want to check the user's active subscription with this method
I am facing the following problem

$user->activeSubscriptions

link

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

@bpuig
Copy link
Owner

bpuig commented Nov 8, 2022

In theory, it can. Since this package was orginally forked, maybe some things don't work as expected. I'll take a look

@bpuig bpuig added the bug Something isn't working label Nov 8, 2022
@stale
Copy link

stale bot commented May 8, 2023

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.

@stale stale bot added the wontfix This will not be worked on label May 8, 2023
@rehmankhalil1001
Copy link

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?

@stale stale bot removed the wontfix This will not be worked on label May 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants