您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

helpers.php 642B

123456789101112131415161718192021222324
  1. <?php
  2. use App\Enums\Setting\EntityType;
  3. use App\Filament\Company\Pages\CreateCompany;
  4. use App\Models\Company;
  5. use function Pest\Livewire\livewire;
  6. function createCompany(string $name): Company
  7. {
  8. livewire(CreateCompany::class)
  9. ->fillForm([
  10. 'name' => $name,
  11. 'profile.email' => 'company@gmail.com',
  12. 'profile.entity_type' => EntityType::LimitedLiabilityCompany,
  13. 'profile.country' => 'US',
  14. 'locale.language' => 'en',
  15. 'currencies.code' => 'USD',
  16. ])
  17. ->call('register')
  18. ->assertHasNoErrors();
  19. return auth()->user()->currentCompany;
  20. }