Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

ConnectedAccount.php 1.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455
  1. <?php
  2. namespace App\Filament\Company\Pages\Service;
  3. use Filament\Actions\Action;
  4. use Filament\Facades\Filament;
  5. use Filament\Pages\Page;
  6. use Filament\Support\Enums\MaxWidth;
  7. use Illuminate\Contracts\Support\Htmlable;
  8. class ConnectedAccount extends Page
  9. {
  10. protected static ?string $navigationIcon = 'heroicon-o-building-library';
  11. protected static ?string $title = 'Connected Accounts';
  12. protected static ?string $navigationGroup = 'Services';
  13. protected static ?string $slug = 'services/connected-accounts';
  14. protected static string $view = 'filament.company.pages.service.connected-account';
  15. public function getTitle(): string | Htmlable
  16. {
  17. return translate(static::$title);
  18. }
  19. public static function getNavigationLabel(): string
  20. {
  21. return translate(static::$title);
  22. }
  23. public static function getNavigationParentItem(): ?string
  24. {
  25. if (Filament::hasTopNavigation()) {
  26. return translate('Banking');
  27. }
  28. return null;
  29. }
  30. protected function getHeaderActions(): array
  31. {
  32. return [
  33. Action::make('connect')
  34. ->label('Connect Account')
  35. ->dispatch('createToken'),
  36. ];
  37. }
  38. public function getMaxContentWidth(): MaxWidth | string | null
  39. {
  40. return MaxWidth::ScreenLarge;
  41. }
  42. }