Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: Allow display of other users ratings by user id. (#66)
* Updated Rateable.php with user parameter Once the userId is provided, the ratings for that user is retrieved instead of the auth user. * Updated ratingPercent and user_id in Rateable.php Second parameter, rounded, was added to ratingPercent, with false as default value, giving the User the option to round off the result or get the float. Corrected the variable userId to user_id. * Update Rateable.php w/ modified byUser Added extra checks on user_id for not null value * Update Rateable.php w/ optimized byUser The function byUser was optimized to avoid overloading the app with unnecessary null check, to improve performance. Thank you @willvincent for pointing this out. * Update Rateable.php without User model import Due to test fails, the import for User model was removed, and the user class fetched from auth.providers instead. * Update Rateable.php w/ Config facade Added Config facade import
- Loading branch information