dimanche 3 février 2019

Laravel 5.1 after Registration Auth::attempt no access to the user data on another page

I am having an issue with accessing the authenticated user data once registered on the system.

After carrying out some validation within my Registration process I have this line:

if (Auth::attempt(array(
        'username' => $customer->username,
        'password' => $data['password']
    ))) {
        return redirect('profile-setup');
    }

I have tried die to see the user data within this if statement, like this:

dd(Auth::user());

This actually works and I can see the user data.

However When I go to the blade profile-setup, I tried the same die but I am getting a null value.

I am not sure as to what I have missed out.

If there's anything that needs to be provided from my end please just let me know. Any help with be appreciated.

Thanks



via Chebli Mohamed

Aucun commentaire:

Enregistrer un commentaire