Trait for nullable fields
Trait for nullable fields heavily inspired from michaeldyrynda/laravel-nullable-fields package.
Usefull only with Laravel <= 5.3. L5.4 comes with
ConvertEmptyStringsToNull by default.
- In the Model where you want empty strings to be set to null add
then set the attribute that shold be transformed:
protected $nullableFields = ['attribute', ...]
The laravel-enso/core package comes with this library included.