dimanche 2 octobre 2016

Laravel 5 Login Authenticated User

I need to send an email after a new user is created.

But I don't know how to return to the home page without getting an error. This is what I am doing right now.

User::create([
            'name' => $data['name'],
            'username' => $data['username'],
            'email' => $data['email'],
            'password' => bcrypt($data['password']),
            'phone' => bcrypt($data['phone']),
            'confirmation_code' => str_random(30),
        ]);

Email_function();

if (Auth::attempt(['email' => $data['email'], 'password' => bcrypt($data['password']) ])) {
        // Authentication passed...
        return redirect('/');
    }

I keep getting this as my error message.

SessionGuard.php line 439:



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire