Skip to content

Commit

Permalink
Update method to share review settings across all views
Browse files Browse the repository at this point in the history
  • Loading branch information
sampoyigi committed Dec 8, 2023
1 parent e624da0 commit 1a88a8d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Extension.php
Original file line number Diff line number Diff line change
Expand Up @@ -64,8 +64,8 @@ public function register()

public function boot()
{
View::share('showReviews', function () {
return (bool)ReviewSettings::get('allow_reviews', false);
View::composer('*', function ($view) {
$view->with('showReviews', (bool)ReviewSettings::get('allow_reviews', false));
});

$this->bindRememberLocationAreaEvents();
Expand Down

0 comments on commit 1a88a8d

Please sign in to comment.