User :: Factory ()-> Utwórz (
$user = User::factory()->create();
$response = $this->actingAs($user, 'api')->json('POST', ...
Mysterious Macaque
$user = User::factory()->create();
$response = $this->actingAs($user, 'api')->json('POST', ...