create([ 'email' => $email, 'password' => bcrypt('password'), 'two_factor_secret' => null, 'two_factor_recovery_codes' => null, ]); } private function loginUser(Browser $browser, User $user): void { $browser->visit('/login') ->type('email', $user->email) ->type('password', 'password') ->press('Log in') ->waitForLocation('/dashboard'); } private function assertWithDebugPause(Browser $browser, callable $assertions, int $pauseMs = 10000): void { try { $assertions($browser); } catch (\Exception $e) { $browser->pause($pauseMs); throw $e; } } }