Test Accounts
Quick reference for logging in as different roles on local/stage environments without bothering an engineer for credentials.
How to seed
On a local or stage environment:
php artisan migrate:fresh --seedFor a complete setup that also wires up roles, permissions, and role assignments (recommended — see note below):
php artisan app:setupImportant: The seeders create users but do not assign Spatie roles. The app:setup command runs the seeders and then calls roles:setup, permissions:setup, members:assign-roles, and admins:assign-roles to wire everything up. If you only run db:seed, the seeded admin accounts will exist but won't have their roles attached, and role-gated endpoints/Filament panels will reject them.
Production never runs seeders. app:setup is hard-blocked in the production environment.
Default accounts (after seeding)
All three admin accounts are created by UserSeeder with the literal password password. Role assignment happens via php artisan admins:assign-roles (run automatically by app:setup).
| Role | Password | What they can do | |
|---|---|---|---|
| OTC_ONE_ADMIN | superadmin@easyotc.com | password | Super admin — full access across all carriers, Filament admin panel, manage users/products/carriers |
| CARRIER_ADMIN | carrier.admin@easyotc.com | password | Manage their own carrier (WellCare by default) — products, members, agents, orders |
| AGENT | agent@easyotc.com | password | Customer-service role — view/assist members, handle issues |
All three are linked to carrier_id = 1 (WellCare — the only carrier created by CarrierSeeder).
Member accounts
MemberSeeder creates members via Member::factory() — emails and passwords come from the factory:
- Emails: random
fake()->unique()->safeEmail()(different on every seed run) - Password:
'password'(set byUserFactorydefault — same literal for every factory user) - Member codes:
MEMBER001andMEMBER002are explicit; the rest are auto-generatedMEMBER#### MEMBER001has DOB01-01-2025and gets explicit shipping + billing addresses
To find the seeded member emails after running db:seed:
php artisan tinker
>>> \App\Models\Member::with('user')->get()->pluck('user.email', 'code');Use password as the password for any of them (factory default).
Additional random users
UserSeeder also creates User::factory(10)->create() — 10 extra users with random emails and password password. These have no role assigned and no associated Member record.
How to create a new admin manually
If you need a personal admin account on stage:
php artisan tinker$user = \App\Models\User::factory()->create([
'first_name' => 'Admin',
'last_name' => 'Tester',
'email' => 'pujen@easyotc.com',
'password' => \Hash::make('whatever-you-want'),
'email_verified_at' => now(),
'carrier_id' => 1,
]);
$user->assignRole(\App\Enums\RoleEnum::OTC_ONE_ADMIN->value);Swap OTC_ONE_ADMIN for CARRIER_ADMIN, AGENT, or MEMBER as needed. Role values live in app/Enums/RoleEnum.php.
If assignRole throws "role does not exist", run php artisan roles:setup first.
Test credit cards (Stripe)
Stripe integration is in progress (see docs/in-progress.md). These test card numbers only work once Stripe is wired up in stage and you're using Stripe test-mode keys:
| Scenario | Card number | Notes |
|---|---|---|
| Success | 4242 4242 4242 4242 | Use any future expiry, any CVC, any ZIP |
| Generic decline | 4000 0000 0000 0002 | Card declined |
| Insufficient funds | 4000 0000 0000 9995 | Decline with insufficient_funds |
| 3DS required | 4000 0027 6000 3184 | Triggers 3D Secure authentication challenge |
| Expired card | 4000 0000 0000 0069 | Decline with expired_card |
Full list: https://docs.stripe.com/testing#cards
Test WEX card
Not present in the codebase. WEX/FSA/HSA test BINs are issued by WEX directly per partner — ask the engineer who set up the WEX integration (or check the WEX sandbox docs once we have a sandbox account). TBD.
Test products
ProductSeeder is commented out in DatabaseSeeder (see line 20 of database/seeders/DatabaseSeeder.php), so a default db:seed does not create any products. Only ProductImageSeeder runs.
If you need products to test the catalog/cart/checkout flow, run the product seeder manually:
php artisan db:seed --class=ProductSeederThis creates ~45 products (mix of in-stock, out-of-stock, prescription, OTC) with random SKUs in the format XX-####-XX (e.g. AB-1234-CD) — there are no fixed test SKUs to memorize. List a few after seeding:
php artisan tinker
>>> \App\Models\Product::take(10)->pluck('sku', 'name');Categories created by the seeder: NSAIDs, Opioids, Antibiotics, Antihistamines, Antacids, Proton Pump Inhibitors, Sleep Aids, Pain Relief, Allergy Relief, Digestive Health, Tablet, Capsule, Liquid, Cream, Gel, Patch (and more).
Resetting the stage DB
Destructive — wipes all data. Engineer-only. Use when test data gets confusing or you want a clean slate:
php artisan migrate:fresh --seed --forceOr the full setup (recommended, since it also assigns roles):
php artisan app:setup --forceBoth are blocked in production. After running, the default accounts above are restored with password password.