Skip to content

Commit

Permalink
Small fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
fabioassuncao committed May 31, 2023
1 parent 6e0586b commit 5633691
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Theme.php
Original file line number Diff line number Diff line change
Expand Up @@ -209,7 +209,7 @@ public function getNamespace(string $path = null): string
return "Themes\\$vendor\\$name\\" . $path;
}

public function getInstance(string $path)
public function getInstance(string $path, ...$params)
{
if (! $this->enabled()) {
$this->requireClass($path);
Expand All @@ -221,7 +221,7 @@ public function getInstance(string $path)
throw new Exception("Class not found: {$class}");
}

return new $class;
return new $class(...$params);
}

/**
Expand Down

0 comments on commit 5633691

Please sign in to comment.