<?php
namespace App\Filament\Resources\ModalityResource\Pages;
use App\Filament\Resources\ModalityResource;
use App\Models\ModalityAttachment;
use App\Models\ModalityYear;
use Filament\Resources\Pages\Concerns\InteractsWithRecord;
use Filament\Forms\Components\Builder;
use Filament\Forms\Components\View;
use Filament\Resources\Pages\Page;
use Filament\Tables\Actions\Contracts\HasTable;
use Filament\Tables\Columns\TextColumn;
use Filament\Tables\Concerns\InteractsWithTable;
use Filament\Tables\Contracts\HasTable as ContractsHasTable;
use Filament\Tables\Table;
class ModalityAttachments extends Page implements ContractsHasTable
{
use InteractsWithRecord, InteractsWithTable;
protected static ?string $model = ModalityAttachment::class;
protected static string $resource = ModalityResource::class;
protected static string $view = 'filament.resources.modality-resource.pages.modality-attachments';
public function mount(int | string $modality, int | string $record): void
{
$this->record = ModalityAttachment::where('modality_year_id', $record);
}
public function table(Table $table): Table
{
return $table
->columns([
TextColumn::make('name'),
]);
}
}