Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions Taskfile.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,12 +110,11 @@ tasks:
- '{{.APP}} php artisan modules:seed'

db:reset:demo:
desc: Reset database and load sample content with an admin account
desc: Reset database and load sample content (the auth module's demo includes an admin)
prompt: This will erase ALL data. Are you sure?
cmds:
- '{{.APP}} php artisan migrate:fresh --seed'
- '{{.APP}} php artisan modules:seed --demo'
- '{{.APP}} php artisan auth:make-admin chef@saucebase.dev'

db:seed:demo:
desc: Seed every module with sample content
Expand Down
3 changes: 2 additions & 1 deletion database/factories/UserFactory.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,8 @@ public function definition(): array
{
return [
'name' => fake()->name(),
'email' => fake()->unique()->safeEmail(),
// Not unique(): it only remembers one request, and E2E tests create each user in its own.
'email' => fake()->userName().'.'.Str::lower(Str::random(8)).'@example.com',
'email_verified_at' => now(),
'password' => static::$password ??= Hash::make('password'),
'remember_token' => Str::random(10),
Expand Down
Loading