Help with Table Builder (Livewire) and passing in data

I see there is a query() method, but suppose I already have a Collection of results. How do I output that into the table?
php public Project $project;

    public function mount(Project $project)
    {
        $this->project = $project;
    }

    public function table(Table $table): Table
    {
        return $table
            ->query($this->project->testcases())
            ->columns([
                TextColumn::make('name')
                    ->searchable(),
                // TextColumn::make('section.name')
                //     ->searchable()

            ])
            ->filters([])
            ->actions([])
            ->bulkActions([]);
    }
Was this page helpful?