1

How can I make a Symfony 2 form so that a particular field is serialized on the database?

The client side will send an array for the field foo, which is VARCHAR in the database. I want the foo be ran through serialize(), but I don't know how to do that, because all I do is:

$form->bind($request);

1 Answer 1

2

You should use data transformers

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.