Skip to content

Commit

Permalink
Fix utility permissions not showing when using route caching
Browse files Browse the repository at this point in the history
  • Loading branch information
duncanmcclean committed Nov 23, 2023
1 parent fbd53fb commit 3eda0e2
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/CP/Utilities/UtilityRepository.php
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ class UtilityRepository
{
protected $utilities;
protected $extensions = [];
protected $booted = false;

public function __construct()
{
Expand All @@ -23,6 +24,8 @@ public function boot()
foreach ($this->extensions as $callback) {
$callback($this);
}

$this->booted = true;
}

public function extend($callback)
Expand All @@ -48,6 +51,10 @@ public function register($utility)

public function all()
{
if (! $this->booted) {
$this->boot();
}

return $this->utilities;
}

Expand Down

0 comments on commit 3eda0e2

Please sign in to comment.