[Bug] Unable to cast repeatable into fake columns , it cant show the saved data
See original GitHub issueBug report
For the new repeatable i need to cast the columns but if the repeatable is inside a fake column, that is already cast, the repeatable cant retrieve the data and it always empty
What I did
I have a fake columns in my model with cast as array In the crud controller i have a repeatable with ‘fake’ => true, ‘store_in’ => ‘extras’,
What I expected to happen
All the data saved in the repeatable shows up
What happened
Repeatable is always empty
Is it a bug in the latest version of Backpack?
Yes
After I run composer update backpack/crud
the bug… is it still there?
Yes
Backpack, Laravel, PHP, DB version
When I run php artisan backpack:version
the output is:
PHP VERSION:
PHP 8.1.4 (cli) (built: Apr 4 2022 13:30:33) (NTS) Copyright © The PHP Group Zend Engine v4.1.4, Copyright © Zend Technologies with Zend OPcache v8.1.4, Copyright ©, by Zend Technologies
LARAVEL VERSION:
v9.5.1@35be2599c9ac3d58bf1578895c2e85ea4848a0d7
BACKPACK VERSION:
5.0.11@337163b7e9a0e63413474bd3ee800a198f83c8e9
Issue Analytics
- State:
- Created a year ago
- Comments:7 (5 by maintainers)
Top GitHub Comments
@tabacitu @pxpm I think i found a rude solution for that
What i do: In the crud controller i overwrote the store/edit methods , with a function to encode the fields with a custom parameter , called ‘encode’, and replace the current request, here the code: `
` That allowed the repeatable to retrieve the data and store it without problems
Idk if that helps you , but is a solution for this specif case
@pxpm Just assume the case for the PageManager: I create various template for the pages , all the data will be stored inside the extras (fake column) , inside that template i need a repeatable for various reason (ex: slider, listing or just n block all displayed the same but with different data), in that case i was unable to use it there ?