Get id user after user has registered in Laravel Default Auth

Known:

Laravel 5.8 used

Solution:

Just insert this code to Auth/RegisterController.php

protected function registered(Request $request, $user)
    {
        echo  $user->id;
        die();
		
   }	

Explain:

registered is a function at vendor/laravel/src/Illuminate/Foundation/Auth/RegistersUsers.php

Thanks for reading

You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *