diff options
Diffstat (limited to 'src/Columns/ElementColumn.php')
-rw-r--r-- | src/Columns/ElementColumn.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/Columns/ElementColumn.php b/src/Columns/ElementColumn.php index aaac071..a6024e3 100644 --- a/src/Columns/ElementColumn.php +++ b/src/Columns/ElementColumn.php @@ -2,15 +2,13 @@ namespace Lightscale\LaralightTables\Columns; +use Closure; use Illuminate\Database\Eloquent\Model; use Illuminate\Support\HtmlString; use Illuminate\View\ComponentAttributeBag; -use Closure; - abstract class ElementColumn extends Column { - protected string $element; /** @@ -18,9 +16,10 @@ abstract class ElementColumn extends Column */ private ?Closure $elemAttributesFn = null; - public function attributes(callable $fn) : static + public function attributes(callable $fn): static { $this->elemAttributesFn = Closure::fromCallable($fn); + return $this; } @@ -42,5 +41,4 @@ abstract class ElementColumn extends Column "<{$this->element} {$attributes}>{$content}</{$this->element}>" ); } - } |