Skip to content

Conversation

tusharnain
Copy link
Contributor

Feature: Add ->style() Method to Column Class

Summary

This PR introduces a new ->style() method to the Column class in Yajra DataTables. Html
It allows developers to apply inline CSS styles directly to individual columns when defining DataTables columns.

Usage

/**
* Get the dataTable columns definition.
*
* @return \Yajra\DataTables\Html\Column[]
* 
* */
public function getColumns(): array
{
    return [
        Column::make('title')->style('color: red; font-weight: 700;'), // Inline CSS added here
    ];
}

Copy link

sonarqubecloud bot commented Oct 2, 2025

@yajra yajra merged commit adeb1cd into yajra:master Oct 3, 2025
6 of 7 checks passed
@yajra
Copy link
Owner

yajra commented Oct 3, 2025

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants