Skip to content
This repository was archived by the owner on Feb 14, 2026. It is now read-only.

Commit 6ac1042

Browse files
Add method getResourceTable to InteractsWithResources trait
1 parent 7dcbd9c commit 6ac1042

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/Concerns/InteractsWithResources.php

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,9 @@
22

33
namespace CodeWithDennis\FilamentTests\Concerns;
44

5+
use Filament\Resources\Pages\ListRecords;
56
use Filament\Schemas\Schema;
7+
use Filament\Tables\Table;
68

79
trait InteractsWithResources
810
{
@@ -25,4 +27,11 @@ public function getResourceForm()
2527
{
2628
return $this->getResource()->form(new Schema);
2729
}
30+
31+
public function getResourceTable()
32+
{
33+
return $this->getResource()->table(new Table(
34+
app('livewire')->new(ListRecords::class)
35+
));
36+
}
2837
}

0 commit comments

Comments
 (0)