You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
October has an amazing behavior \System\Behaviors\SettingsModel::class, which is made a simple custom business logic setup.
After 2 months of development, we noticed that the number of fields in the model exceeded 50.
And when adding a new field, we have to constantly update the model itself and add the name of this field to the translatable array. Of course, the human factor leads to bugs.
We suggest to add asterisk support as wildcard for all existing fields as it works in other service arrays: protected $guarded = ['*'];
but this time: public $translatable = ['*']
The text was updated successfully, but these errors were encountered:
iMateo
changed the title
Add public $translatable = ['*'] as wildcard for
Add public $translatable = ['*'] as wildcard.
Dec 26, 2022
It is a nice idea and should be simple to implement, although the results may be unpredictable since a block-list would be required for some core attributes. For example, NestedTree has nest_left, nest_right, etc. It may be difficult to predict all the possibilities.
October has an amazing behavior
\System\Behaviors\SettingsModel::class
, which is made a simple custom business logic setup.After 2 months of development, we noticed that the number of fields in the model exceeded 50.
And when adding a new field, we have to constantly update the model itself and add the name of this field to the translatable array. Of course, the human factor leads to bugs.
We suggest to add asterisk support as wildcard for all existing fields as it works in other service arrays:
protected $guarded = ['*'];
but this time:
public $translatable = ['*']
The text was updated successfully, but these errors were encountered: