In RegisterController I wrote
$user=User::create([ ... ]); Auth::login($user); $myid = Auth::id(); return redirect()->route('profile',['id'=>$myid]), And I redirect to page with new id.
In web.php I wrote
Route::get('/profile/{id}','ProfileController@show')->name('profile'); But in ProfileController show I wrote dump(Auth::user()) and it shows 'null' I tried with sessions. But session are not saving and it also shows 'null'. I tried to change Kernel.php but it didnt help. I tried all routes move to middleware web although Laravel automatically uses this middleware. Of course, it also didnt help. I have this problem.
dump(Auth::user())