Laravel-Backpack / community-forum

A workspace to discuss improvement and feature ideas, before they're actually implemented.
28 stars 0 forks source link

Displaying a flag based on value based on multiple columns #734

Closed exorgroup closed 11 months ago

exorgroup commented 11 months ago

In a list I would like to display a svg image showing if the record has been tempered with or not. For this reason I have a hash value stored in the database. I need to compare the hash value in the database with the one generated for the data. If they match than I want to display a particular svg image, and if they do not match I want to display another svg image.

My idea was to use a custom column but have stumbled upon a block - one table my have 3 columns, another may have 10 columns whilst another may have 7 columns and do not want to create a custom column for each screen that I have to perform the same function

Could do with placing everything in an array and than go through the array in the function but do not know how I can get the data (all columns values) in an array and passed to the function evaluated there and the right svg image displayed

Any suggestion is welcome