Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Relations documentation #15

Open
theveloperspl opened this issue Jul 24, 2021 · 0 comments
Open

Relations documentation #15

theveloperspl opened this issue Jul 24, 2021 · 0 comments
Labels
documentation Improvements or additions to documentation

Comments

@theveloperspl
Copy link

Hello,
I suggest adding a documentation block about available relations.
It took me a while to find them so having such information at the start will save some time and effort for library users.
I am talking about those two relations as they are not described anywhere:

        $user = User::find(1);
        $achievements = $user->achievements;

        foreach ($achievements as $achievement) {
            dump($achievement->details); <- this one
            dump($achievement->achiever); <- and that one too
        }

Also, PHPStorm IDE is not suggesting them until you scan the library models directory with the command (which may be worth mentioning):

php artisan ide-helper:models --dir="vendor/assada/laravel-achievements/src/Model"

Thanks for reading my suggestions and I hope to get back from you soon.

@assada assada added the documentation Improvements or additions to documentation label Jul 27, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation
Projects
None yet
Development

No branches or pull requests

2 participants