Skip to content

Commit

Permalink
Update Reviewable.php
Browse files Browse the repository at this point in the history
  • Loading branch information
frknasir committed May 9, 2024
1 parent 6ee7814 commit 531a69c
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions src/Reviewable.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ trait Reviewable
{
/**
* Leaves a review on the model.
*
* @param mixed $user
* @param string|null $comment
* @return void
*/
public function review($user, int $rating, $comment = null)
{
Expand All @@ -30,6 +26,8 @@ public function review($user, int $rating, $comment = null)
$review->comment = $comment;

$review->save();

return $review->fresh();
}

/**
Expand Down

0 comments on commit 531a69c

Please sign in to comment.