From 1d38abc32e47db013c3ba5bf78fbe628af5b5aea Mon Sep 17 00:00:00 2001 From: Fajarwz Date: Sun, 11 Aug 2024 16:24:54 +0700 Subject: [PATCH] fix: docs regarding traits, add return true to approval methods --- README.md | 4 ++-- src/Models/Review.php | 4 ++++ 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 64ceabc..907be07 100644 --- a/README.md +++ b/README.md @@ -31,7 +31,7 @@ Include the necessary traits in your models: For models that can be reviewed, use the `CanBeReviewed` trait: ```php -use Fajarwz\LaravelReview\CanBeReviewed; +use Fajarwz\LaravelReview\Traits\CanBeReviewed; class Mentor extends Model { @@ -45,7 +45,7 @@ class Mentor extends Model For models that can submit reviews, use the `CanReview` trait: ```php -use Fajarwz\LaravelReview\CanReview; +use Fajarwz\LaravelReview\Traits\CanReview; class Mentee extends Model { diff --git a/src/Models/Review.php b/src/Models/Review.php index b5ce7c6..59168f4 100644 --- a/src/Models/Review.php +++ b/src/Models/Review.php @@ -69,6 +69,8 @@ public function approve(): void /** @phpstan-ignore-next-line */ $this->reviewable->updateReviewSummary($params); }); + + return true; } /** @@ -93,6 +95,8 @@ public function unapprove(): void /** @phpstan-ignore-next-line */ $this->reviewable->updateReviewSummary($params); }); + + return true; } /**