CRUD icon indicating copy to clipboard operation
CRUD copied to clipboard

revert model_function column

Open pxpm opened this issue 3 years ago • 2 comments

We broke model_function column here: https://github.com/Laravel-Backpack/CRUD/pull/3936 We added $column['value'] = >>> $column['value'] ?? <<< $entry->{$column['function_name']}(...($column['function_parameters'] ?? [])); and guess what happens if your column name is a real colum in database that has value ? Yes, the model function never runs.

pxpm avatar Sep 15 '22 17:09 pxpm

This looks like fun 😅:

CleanShot 2022-09-16 at 08 21 23@2x

tabacitu avatar Sep 16 '22 05:09 tabacitu

You can see how much I think this field is inconsistent!

Something in the software I work for, that I would never use for sure 🙃

pxpm avatar Sep 16 '22 09:09 pxpm

Hi @pxpm i try to reproduce this problem but i have no luck.

On main branch i try this on Product Model:

Create function "details", this column exists on table too Screen Shot 2022-10-03 at 11 33 56

Add the column Screen Shot 2022-10-03 at 11 33 34

And everything was working normal screenshot-backpack test-2022 10 03-11_34_03

Let me know if i miss something.

Cheers.

jcastroa87 avatar Oct 03 '22 14:10 jcastroa87