| Current Path : /home/webg5288/public_html/laravel_kendal/vendor/filament/actions/src/Concerns/ |
| Current File : /home/webg5288/public_html/laravel_kendal/vendor/filament/actions/src/Concerns/CanClose.php |
<?php
namespace Filament\Actions\Concerns;
use Closure;
trait CanClose
{
protected bool | Closure $shouldClose = false;
public function close(bool | Closure $condition = true): static
{
$this->shouldClose = $condition;
return $this;
}
public function shouldClose(): bool
{
return (bool) $this->evaluate($this->shouldClose);
}
}