lundi 28 août 2017

Having errors while registering in laravel 5

I have RegisterController.php

   protected function create(array $data)
    {
        $path = Storage::putFile('userimages',$data['userimage']);
        return User::create([
            'name' => $data['name'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'userimage' => $path,
        ]);
    }

And I am having Error

QueryException SQLSTATE[HY000]: General error: 1364 Field 'userimage' doesn't have a default value (SQL: insert into users (name, email, password, updated_at, created_at) values (Faiez, faiez@gmail.com, $2y$10$L/fbxh6IrwmbFNb9T98ww..IhQyBb84vRxwPxDyxsy/V29W2GPsxy, 2017-08-28 07:19:22, 2017-08-28 07:19:22))



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

Aucun commentaire:

Enregistrer un commentaire