Skip to content
Discussion options

You must be logged in to vote

The empty string gets trimmed and becomes null. It's expected, not a bug.
You have two options:

  • You change your DB column to accept null
  • Or set (empty string) value conditionally before saving via Laravel model events

Replies: 1 comment 3 replies

Comment options

You must be logged in to vote
3 replies
@nataliiatytovych
Comment options

@karandatwani92
Comment options

Answer selected by nataliiatytovych
@nataliiatytovych
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants