Replies: 3 comments
-
I don't understand why on getting edit page, the mutator function in the model is run. |
Beta Was this translation helpful? Give feedback.
0 replies
-
The reason why mutator ran was because i overloaded the edit() function in my controller, still don't understand why it ran though. |
Beta Was this translation helpful? Give feedback.
0 replies
-
I have changed table structure to avoid this problem. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I have a column named 'value', which is text datatype in MySQL, it is then casted to JSON in its model class.
The structure is always the same, defined as below:
[ 'image_path' => (string) 'path/to/image', 'url' => (string) 'some/url' ]
I have tried the following but values are not displayed in the edit page:
CRUD::addField([
'name' => 'value.image_path',
'label' => 'Icon',
'type' => 'upload',
'upload' => true,
]);
CRUD::addField([
'name' => 'value.url',
'label' => 'URL',
'type' => 'text',
]);
I have the same fields as columns in list operation as below, which displays the correct data:
CRUD::addColumn([
'name' => 'value.image_path',
'label' => 'Icon',
'type' => 'image',
]);
CRUD::addColumn([`
'name' => 'value.url',
'label' => 'URL',
'type' => 'text',
]);
Beta Was this translation helpful? Give feedback.
All reactions