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?



from Newest questions tagged laravel-5 - Stack Overflow http://ift.tt/1JHioT0
via IFTTT

Aucun commentaire:

Enregistrer un commentaire