sotjj
Artisan commands will not run after adding in a PanelProvider
So, it turns out that there are just issues in various resources, widgets, and pages that are causing these methods to fail.
I commented out the discover methods and I am going through the process of loading them one-by-one to see which ones are causing problems. So far, the issue in most of my resources was the following:
I commented out the discover methods and I am going through the process of loading them one-by-one to see which ones are causing problems. So far, the issue in most of my resources was the following:
protected function getDefaultTableRecordsPerPageSelectOption(): int
{
return 20;
}
When loading this manually, I received a detailed error message instead of the earlier 500 error:
getDefaultTableRecordsPerPageSelectOption() must be public (as in class Filament\Resources\Pages\ListRecords)
Setting this to public allowed the resource to load. So, now I am just going through and loading resources, pages and widgets manually (without the discover method) to solve the issues for each one.3 replies
Artisan commands will not run after adding in a PanelProvider
I think I have narrowed it down to the discoverResources, discoverPages, and discoverWidgets methods. I am guessing there is a problem with my path after the upgrade (update: not a path issue, see below for updates). I will post the solution if I figure it out.
3 replies
Access filters in action
Although this works within the livewire component, the problem I am having is accessing this from a page action.
In other words, $this->tableFilters works within the getTableActions() within the livewire component.
However, on my filament custom page, using getActions() to make a button at the top of the page, how can I get this value from the livewire component? Will I need to emit an event or is there something built into filament so I can get to this?
However, on my filament custom page, using getActions() to make a button at the top of the page, how can I get this value from the livewire component? Will I need to emit an event or is there something built into filament so I can get to this?
9 replies
I think lte validator is not working
I am having the same issue and receiving this error when using ->lte validation:
The amount field must be less than or equal to data.9999.99.
I handled this with a regex validation instead:
->regex('/^-?[0-9]{1,4}(?:.[0-9]{1,2})?$/'),
This allows for positive and negative numbers and only up to two decimal places with a range of -9999.99 to 9999.99
5 replies