Support the ongoing development of Laravel.io →
Security Requests Database
Last updated 2 years ago.
0

edit your table and add a column "email"

0

any other sollution?

0

you can use migration if you don't have phpMyAdmin. But to be honest I prefer phpMyAdmin because of the GUI interface.

Last updated 9 years ago.
0

First off, make sure you understand the difference between a column in a database, and a field in a form. your first post used these loosely which in turn gave you somewhat mixed answers-

It would seem that you use a simple User::save() command on the data from your form.

If that is the case, then your problem is with eloquent. It will attempt to guess the correct column from the form fields, and you probably had one called email.

Your solution is either to a) Manually save the Model and thus ensuring that the JSON array is saved correctly. b) Do as iridion9 suggests, and add an email column.

Personally i never go without having email as one my columns in the User model.

In regards to the JSON, use json_encode and json_decode to go from a PHP array to JSON and vice versa.

0

Sign in to participate in this thread!

Eventy

Your banner here too?

jignesh87 jignesh87 Joined 22 Jan 2015

Moderators

We'd like to thank these amazing companies for supporting us

Your logo here?

Laravel.io

The Laravel portal for problem solving, knowledge sharing and community building.

© 2024 Laravel.io - All rights reserved.