TenantAtlas/app/Filament/Resources/TenantResource/Pages/ListTenants.php
2026-02-13 02:29:38 +01:00

27 lines
726 B
PHP

<?php
namespace App\Filament\Resources\TenantResource\Pages;
use App\Filament\Resources\TenantResource;
use Filament\Actions;
use Filament\Resources\Pages\ListRecords;
class ListTenants extends ListRecords
{
protected static string $resource = TenantResource::class;
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make()
->disabled(fn (): bool => ! TenantResource::canCreate())
->tooltip(fn (): ?string => TenantResource::canCreate() ? null : 'You do not have permission to register tenants.'),
];
}
protected function getTableEmptyStateActions(): array
{
return $this->getHeaderActions();
}
}