Files
Paymenter-Version-Tracks/app/Admin/Resources/UserResource/Pages/ShowBillingAgreements.php
Muhammad Tamir b3933b9960 v1.4.0
2025-11-14 10:59:24 +07:00

39 lines
1.2 KiB
PHP

<?php
namespace App\Admin\Resources\UserResource\Pages;
use App\Admin\Resources\GatewayResource;
use App\Admin\Resources\UserResource;
use Filament\Resources\Pages\ManageRelatedRecords;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Table;
class ShowBillingAgreements extends ManageRelatedRecords
{
protected static string $resource = UserResource::class;
protected static string $relationship = 'billingAgreements';
protected static string|\BackedEnum|null $navigationIcon = 'ri-bank-card-line';
public static function getNavigationLabel(): string
{
return 'Billing Agreements';
}
public function table(Table $table): Table
{
return $table
->recordTitleAttribute('name')
->columns([
TextColumn::make('name')
->label('Name'),
TextColumn::make('external_reference')
->label('External Reference'),
TextColumn::make('gateway.name')
->url(fn ($record) => GatewayResource::getUrl('edit', ['record' => $record->gateway_id]))
->label('Gateway'),
]);
}
}