F
Filament13mo ago
darwin

custom page with table

hello everyone, i made a custom page for my model and i want to display a table for this, here is my code:
class StudentReport extends Page
{
protected static ?string $model = Student::class;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.student-report';

protected static ?string $navigationGroup = 'Reports';

protected static ?int $navigationSort = 3;

public static function table(Table $table): Table
{
return $table
->columns([

]);
}


}
class StudentReport extends Page
{
protected static ?string $model = Student::class;

protected static ?string $navigationIcon = 'heroicon-o-document-text';

protected static string $view = 'filament.pages.student-report';

protected static ?string $navigationGroup = 'Reports';

protected static ?int $navigationSort = 3;

public static function table(Table $table): Table
{
return $table
->columns([

]);
}


}
unfortunately it doesnt display on my page. is there a way to display a table for my model? thanks
1 Reply
Dennis Koch
Dennis Koch13mo ago
Please have a look at the table docs. You can’t just define table() and expect it to work magically.
Want results from more Discord servers?
Add your server