mardi 29 décembre 2015

Fill extra column for User

I have a user table with a referral column and this code in controller/auth:

protected function create(array $data)
    {

        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'referral' => md5($data['email']),
            ]);
    }

It adds a name, email and password but not referral.

There is no error or notice. What should I do to fill also referral column?



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire