'How to change background-color of row on index page of resource in Laravel Nova?
Depending on the content in the "status" column, the row should be of a certain color. For example, if the 'status' is 'null', then the row is yellow.
Solution 1:[1]
I would try using asHtml method:
Text::make('Status', function () {
return view('partials.status', [
'is_passing' => $this->isPassing(),
])->render();
})->asHtml()
It is described here: https://nova.laravel.com/docs/1.0/resources/fields.html#computed-fields
Since tailwindcss is all within your html you might be able to stick some timple logic in there.
Other then that I would look at one of custom nova packages and how they do this.
Hope it helps!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | ibrahem alanany |
