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

Companies.php 689B

123456789101112131415161718192021222324252627282930
  1. <?php
  2. namespace App\Filament\Pages;
  3. use Filament\Pages\Page;
  4. use Illuminate\Support\Facades\Auth;
  5. class Companies extends Page
  6. {
  7. protected static ?string $navigationIcon = 'heroicon-o-office-building';
  8. protected static string $view = 'filament.pages.companies';
  9. protected static function shouldRegisterNavigation(): bool
  10. {
  11. return Auth::user()->currentCompany->name === 'ERPSAAS';
  12. }
  13. public function mount(): void
  14. {
  15. abort_unless(Auth::user()->currentCompany->name === 'ERPSAAS', 403);
  16. }
  17. protected function getHeaderWidgets(): array
  18. {
  19. return [
  20. \App\Filament\Pages\Widgets\Companies::class,
  21. ];
  22. }
  23. }