Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions src/Html/Builder.php
Original file line number Diff line number Diff line change
Expand Up @@ -263,4 +263,13 @@ public function addScript(string $view): static

return $this;
}

public function addScriptIf(bool $condition, string $view): static
{
if ($condition) {
$this->addScript($view);
}

return $this;
}
}