wire auth api
This commit is contained in:
parent
9e70fae38d
commit
eff7c5c281
12 changed files with 137 additions and 19 deletions
22
backend/database/seeders/UserSeeder.php
Normal file
22
backend/database/seeders/UserSeeder.php
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
<?php
|
||||
|
||||
namespace Database\Seeders;
|
||||
|
||||
use App\Auth\PasswordHasher;
|
||||
use App\Shared\ValueObject\EmailAddress;
|
||||
use App\User\CreateUserDto;
|
||||
use App\User\UserRepository;
|
||||
use Illuminate\Database\Seeder;
|
||||
|
||||
class UserSeeder extends Seeder
|
||||
{
|
||||
public function run(): void
|
||||
{
|
||||
$userRepository = app(UserRepository::class);
|
||||
$passwordHasher = app(PasswordHasher::class);
|
||||
$userRepository->create(new CreateUserDto(
|
||||
email: new EmailAddress('test@example.com'),
|
||||
passwordHash: $passwordHasher->hash('password123!@#'),
|
||||
));
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue