| 1234567891011121314151617181920212223242526272829 |
- <?php
- namespace App\Filament\Tables;
- use Filament\Tables\Table;
- use Illuminate\Database\Eloquent\Model;
- use Illuminate\Support\Collection;
- class ExternalDataTable extends Table
- {
- protected Collection $records;
- public function setRecords(Collection $records): static
- {
- $this->records = $records;
- return $this;
- }
- public function getRecords(): Collection
- {
- return $this->records ?? new Collection();
- }
- public function getTotalRecords(): ?int
- {
- return $this->getRecords()->count();
- }
- }
|