How are you storing these "interests" in your database? Have you set them up as a one-to-many or many-to-many relation?
Also, it would probably be best to specify exactly the fields you're populating in your model, instead of using Input::all(), to avoid injection exploits.
Hi, I am planning to store them as comma seperated values in a string.
If you're determined to use Input::all() you could set an event listener on your model and change the value of the array before saving... Change it to json, maybe, using json_encode().
http://laravel.com/docs/eloquent#model-events
Also, don't forget to protect the app from mass injection.
Yes, already protecting and accepting only certain fields with $protected
Sign in to participate in this thread!
The Laravel portal for problem solving, knowledge sharing and community building.
The community