Skip to content

Commit a2890f4

Browse files
committed
Wip
1 parent 8847300 commit a2890f4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/Models/Review.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ public function getDepartmentsAttribute($value)
4949

5050
public function addRating($type, $rating)
5151
{
52-
$max = config('reviewrateable.max_rating_value');
53-
$min = config('reviewrateable.min_rating_value');
52+
$max = config('review-ratable.max_rating_value');
53+
$min = config('review-ratable.min_rating_value');
5454

5555
if ($rating >= $min && $rating <= $max) {
5656
$ratings = $this->ratings;

src/Traits/ReviewRateable.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ public function reviews(): MorphMany
1515

1616
public function ratingTypes(): array
1717
{
18-
return config('review-rateable.default_rating_types');
18+
return config('review-ratable.default_rating_types');
1919
}
2020

2121
public function addReview(array $data, Model $author)
@@ -33,7 +33,7 @@ public function addReview(array $data, Model $author)
3333
// Create review
3434
$data['author_id'] = $author->id;
3535
$data['author_type'] = get_class($author);
36-
$data['approved'] = $data['approved'] ?? config('review-rateable.default_approved', false);
36+
$data['approved'] = $data['approved'] ?? config('review-ratable.default_approved', false);
3737
$review = new Review($data);
3838
$this->reviews()->save($review);
3939

0 commit comments

Comments
 (0)