8000 Merge pull request #256 from tusharnain/feat/column-style · yajra/laravel-datatables-html@adeb1cd · GitHub
[go: up one dir, main page]

Skip to content

Commit adeb1cd

Browse files
authored
Merge pull request #256 from tusharnain/feat/column-style
Add ->style() method to Column class for inline CSS styling in DataTables
2 parents cf875db + f0a95f2 commit adeb1cd

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

src/Html/Column.php

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,18 @@ public function title(string $value): static
8888
return $this;
8989
}
9090

91+
/**
92+
* Set column style.
93+
*
94+
* @return $this
95+
*/
96+
public function style(string $css): static
97+
{
98+
$this->attributes['style'] = $css;
99+
100+
return $this;
101+
}
102+
91103
/**
92104
* Create a computed column that is not searchable/orderable.
93105
*/

0 commit comments

Comments
 (0)
0