You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

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. }