TenantAtlas/app/Filament/Resources/TenantResource/Pages/ListTenants.php
2026-02-01 12:19:57 +01:00

23 lines
662 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()
->label('Add managed tenant')
->disabled(fn (): bool => ! TenantResource::canCreate())
->tooltip(fn (): ?string => TenantResource::canCreate() ? null : 'You do not have permission to add managed tenants.'),
];
}
}