argument('email'); $password = $this->argument('password'); $user = User::where('email', $email)->first(); if (!$user) { $this->error("User with email {$email} not found!"); return 1; } $this->info("User found: {$user->name} ({$user->email})"); $this->info("User ID: {$user->id}"); $this->info("User Status: {$user->status}"); $this->info("Password Hash: " . substr($user->password, 0, 30) . "..."); // Test password if (Hash::check($password, $user->password)) { $this->info("✅ Password matches!"); } else { $this->error("❌ Password does NOT match!"); } // Check roles $roles = $user->roles->pluck('name'); $this->info("Roles: " . $roles->join(', ')); // Test if user can login if (auth()->attempt(['email' => $email, 'password' => $password])) { $this->info("✅ Authentication successful!"); auth()->logout(); } else { $this->error("❌ Authentication failed!"); } return 0; } }