title: Where am I going wrong when creating authentication in Laravel?
body: <p><strong>PHP 7.4</strong></p>
  <p><strong>Laravel 8</strong></p>
  <p><strong>Route 1</strong> (super.com/auth):
  Receives email, password data and makes authentication.</p>
  <pre><code>$result = Auth::Attempt(['password' =&gt; 'superpwd', 'email' =&gt; 'super@mail.ru'], true);
  Auth::check() // true
  </code></pre>
  <p><strong>Route 2</strong> (super.com/testAuthCheck):
  We check the authentication.</p>
  <pre><code>Auth::check(); // false
  </code></pre>
  <p>It turns out that the authentication is not saved in the session.
  Please tell me where I'm wrong? May be session or some setting, or modules...</p>
  <p><strong>Full code</strong>:</p>
  <pre><code>
  use App\Models\User;
  use Illuminate\Http\Request;
  use Illuminate\Support\Facades\Auth;
  use Hash;
  
  class AuthUser extends Controller
  {
      public function register(Request $request)
      {
          $request-&gt;validate([
              'name'       =&gt; 'required|string',
              'lastname'   =&gt; 'required|string',
              'secondname' =&gt; 'required|string',
              'tel'        =&gt; 'required|numeric',
              'password'   =&gt; 'required|string',
          ]);
  
          $user = User::create([
              'name'       =&gt; $request-&gt;name,
              'lastname'   =&gt; $request-&gt;lastname,
              'secondname' =&gt; $request-&gt;secondname,
              'tel'        =&gt; $request-&gt;tel,
              'password'   =&gt; Hash::make($request-&gt;password),
              'email'      =&gt; '',
          ]);
  
          $login = Auth::login($user);
  
          return response()-&gt;json([
              'message' =&gt; 'Success!',
              'login' =&gt; $login
          ]);
      }
      public function test(Request $request) {
          if(Auth::Attempt(['password' =&gt; 111, 'email' =&gt; 'a@b.ru'], true)) {
              $request-&gt;session()-&gt;regenerate();
              $result = Auth::check();
              dump($result); // true
          }
      }
  
      public function test2(Request $request) {
          $result = Auth::check();
          dump($result); // false
      }
  </code></pre>