Resources / Simple resources

I have a resource that I'm working with. When I set my actions with ->url(null), it transforms my page into a form modal. I'm wondering if this is the correct approach when I want to set my resource (or a specific page) as "simple," or if I should regenerate my resource with the "simple" option instead.
class ListPosts extends ListRecords
{
protected static string $resource = PostResource::class;

protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make()
->url(null),
];
}
}
class ListPosts extends ListRecords
{
protected static string $resource = PostResource::class;

protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make()
->url(null),
];
}
}
2 Replies
Dan Harrin
Dan Harrin2y ago
just remove the pages from getPages() in the resource leave the list page you dont need to url(null)
LeandroFerreira
LeandroFerreiraOP2y ago
Perfect! thank you!
Want results from more Discord servers?
Add your server