Skip to content
Discussion options

You must be logged in to vote

I got what I need and I am sharing so that I learn if it can be improved

this is my column definition

CRUD::column([
            // run a function on the CRUD model and show its return value
            'name'  => 'Hash',
            'label' => 'Hash', // Table column heading
            'type'  => 'model_function',
            'escaped' => false,
            'function_name' => 'getHash', // the method in your Model
             'limit' => 2000, // Limit the number of characters shown
         ]);

in model

 public function getHash() {
        if (Security::validData(array($this->name, $this->surname,$this->age), $this->HASH)) {
            return  '<img src="green.png">';
        }

       

Replies: 1 comment 5 replies

Comment options

You must be logged in to vote
5 replies
@siberfx
Comment options

@exorgroup
Comment options

@tabacitu
Comment options

@exorgroup
Comment options

Answer selected by tabacitu
@tabacitu
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
3 participants
Converted from issue

This discussion was converted from issue #734 on November 08, 2023 10:16.