ifox
10/18/2021, 1:28 PMHarings Rob
10/18/2021, 1:29 PMifox
10/18/2021, 1:29 PMHarings Rob
10/18/2021, 1:31 PMifox
10/18/2021, 1:31 PMHarings Rob
10/18/2021, 1:32 PMifox
10/18/2021, 1:33 PMifox
10/18/2021, 1:34 PMawesome-twill listifox
10/18/2021, 1:34 PMHarings Rob
10/18/2021, 1:35 PMRayderxx
10/18/2021, 1:37 PMRayderxx
10/18/2021, 1:38 PMpboivin
10/18/2021, 1:39 PMRayderxx
10/18/2021, 1:43 PMifox
10/18/2021, 1:43 PMifox
10/18/2021, 1:44 PMRayderxx
10/18/2021, 1:45 PMHarings Rob
10/18/2021, 1:48 PMif (!Capsule::available('categories') {
throw new Exception('This capsule requires the categories capsule');
}Rayderxx
10/18/2021, 2:03 PMpboivin
10/18/2021, 2:20 PMRayderxx
10/18/2021, 3:21 PMRayderxx
10/18/2021, 3:21 PMSami
10/18/2021, 4:01 PMgetFormFields function in the repository, right?
But even if I set value to one specific input, it's not shown and the input shows -38 characters.
Practically:
model Product has attribute stock (which contains JSON)
there is a formField named stock (which is a number)
in getFormFields I set, e.g., $fields['stock'] = 22 and it does what I mentioned above.
However if I set the $object->stock = 22, it works properly.
Probably my understanding of what getFormFields does is limited or wrong, but all other fields get set as I declared in $fields arraypboivin
10/18/2021, 4:07 PMstock field to something else, like stock_input to avoid sharing the attribute name?Sami
10/18/2021, 4:08 PMpboivin
10/18/2021, 4:15 PMgetFormFields() method?Sami
10/18/2021, 4:16 PMRayderxx
10/19/2021, 9:16 AMHarings Rob
10/19/2021, 9:19 AMApp::register() your capsule service provider, and do it from there (or just directly).Rayderxx
10/19/2021, 9:23 AM