nowak
Maximum execution time of 30 seconds exceeded
Since I am only using livewire / blade for my filament admin panel in my laravel app, and I am getting this error a lot when developing the filament admin panel locally, but not the vue frontend, I thought this was the best place to ask about this.
I am getting this error every time I navigate to a page, where I have to refresh the page at least one time to get rid of it:
Which usually is pointing to the
vendor/symfony/finder/Iterator/SortableIterator.php:51
file where line 51 is this:
Flare error share:
https://flareapp.io/share/NPLx0BQP
Has anyone else experienced this? Or know what the most probable cause is for this? It is getting quite difficult for me to do local development on my filament admin panel based on this, so I would really love to find the cause for this and fix it.
Any help is highly appreciated!16 replies
When using the Tabs layout in custom page, how can I make an action react to tab changes?
I have a form with a tab layout, with 3 tabs and 3 action buttons.
Now I want to make sure that only one action shows for each tab.
This is my Tabs layout schema:
Where I attempted to fetch the current tab from the url parameter and hide my actions conditionally like this:
This only works on page load, but not when I change the tabs dynamically. How can I make this work when switching tabs dynamically?
12 replies
Is it possible to create a Filament settings page with a tabbed form, for multiple settings groups?
I have created a few Filament Spatie Settings pages, but I feel like this quickly gets overwhelming with more and more settings pages.
So I was wondering how to create a settings page, that contains a tabbed view of all settings groups, where each tab would be a form for that specific settings group?
15 replies
How to trigger a custom action modal directly from a TextInputColumn updateStateUsing?
I have a TextInputColumn on a table for my resources
route_id
attribute. When this is changed to a route_id
that does not exist, I want to prompt the user with an action modal, where they can create a new route
record, which would update the route_id
column with the id of the newly created route.
I am trying to do this:
But the action modal does not get triggered at all, what am I doing wrong?41 replies
Developing on Filament and Filament Plugin locally causes duplicate classes of same namespaces
Hi, I am running a local fork of Filament in my app, and point to this in my composer.json file.
Then I am also running a local fork of the Filament Google Maps plugin, which introduces it's own Filament instance it seems, which breaks my overrides of methods in classes from my initial Filament package fork.
I am including these in my composer.json like this:
And I am overriding the Filament\Tables\Concerns\CanReorderRecords::reorderTable method which I have customized in my Filament package fork like this:
Where when I cmd + hover over
parent::reorderTable
, I see the following definitions:
And when I cmd + click parent::reorderTable
, I navigated to:
Instead of to:
How can I make sure that I override the reorderTable
method in the correct package?4 replies
How to treat Filament resource logic in relation to the rest of my laravel app architecture?
I am not sure how to ask this, but I hope the essense of my question makes sense.
I am wondering how I should interpret Filament resource files compared with the rest of the laravel architecture.
For example if I have a textinput column in a resource table, changing this would trigger a eloquent model update. Then I could technically use the model observer to add logic when the model is updated.
But I prefer to use actions, as I usually send requests to a controller, which then triggers an action, which uses methods from a Service class that contains the business logic, and dispatch an event from the action, etc..
So for example if I have an action button in a filament resource table, that updates an attribute of a record, I could also trigger methods from a Service or trigger an app/Action/UpdateXyz class.
So should I treat whatever happens in Filament as a controller, or where should I place whatever happens in filament in relation to the rest of my laravel app?
4 replies
Hide TextInput form field but keep spacing it's spacing
Hi, I am looking for a way to conditionally hide a TextInput field, without messing up the height of the schema, is this possible?
This is my TextInput field:
Which is used in a Repeater item schema like this:
6 replies
How to add a link to resource entry in a database notification?
I have a Controller in my laravel app that gets triggered when a create record form is submitted from a Vue frontend, and I am wondering how to add an action to the notification that navigates to the created record.
I tried this:
Where I get this error:
Any help is much appreciated!
4 replies
How to get all table records in header action
I want to add a header action for my admin panel resource table, where I need to send the records to a blade view to create a pdf export.
What is the best way to get a Collection of the current tables records in a header action?
I tried to do this:
But the looks don't show anything useful:
5 replies
Add summaries to exports
I tried to add
->summarize([])
to an exporter, but Filament\Actions\Exports\ExportColumn::summarize does not exist
.
Are there any workarounds for doing this? I need to export a table and keep the summary information in the export.2 replies
Summing TextColumn on nested relationship
I have a GroupOrderResource that has many UserOrder, with the relationship
userOrders
, then my UserOrder model has this relationship with ProductSku:
Then I want my TextColumn to show all ProductSku quantities for each Group Order, and my attempt was to do this:
But I get this error:
Is this an issue with attempting to sum a number from a nested relationship, or am I doing something else wrong?6 replies
Searchable select field shows incorrect search results
I added a select field to my form like this:
When I then search for a string, results are shown for records that do not contain the string added to the input field, which is not what I would expect to happen. Is this happening due to the complexitty of my Select field? Or is this standard searchable select field behaviour?
2 replies
How to customise completed export notification/events?
I want to change the way I receive the completed export notification, or add to it. I want to either broadcast the notification in real time, or send the completed export notification to the UI as well as to the database.
I know I can control this fully in the ExportCompletion.php jobs handle method:
I hear that overriding files like filament/packages/actions/src/Exports/Jobs/ExportCompletion.php is not advised. So what is the best way to customise what happens when an export job completes?
Any help is much appreciated!
11 replies
Why is this bad? Sending export completion notification to the UI as well as to the database.
I played around with the built in filament/packages/actions/src/Exports/Jobs/ExportCompletion.php handle() Notification, where adding
->send()
to this shows the notification directly in the UI instead of only being hidden in the notifications tray:
I feel like this would make the user experience more intuitive, and reduces the amount of clicks needed by the user to download a file, and I am wondering why it wasn't implemented like this originally?6 replies
Understanding the DatabaseNotificationsSent event. Not seeing websocket notifications in admin panel
I have Echo and Soketi running for real time notifications, where I want to dispatch filaments built in
DatabaseNotificationsSent
event.
Since I want to use this with export actions, I quickly added the DatabaseNotificationsSent
event to the bottom of the /actions/src/Exports/Jobs/ExportCompletion.php handler to test:
The event seems to be dispatched correctly, as I see this in my soketi docker logs:
But I do not see any websocket notification in the filament panel after this is triggered. Do I need to add any other configurations or setup something else, other than what is needed for database notifications? I see the "Export Completed" database notifications in the notification tray, so that works.
Maybe I misunderstood something, should DatabaseNotificationsSent
not result in a notification in the UI?2 replies
How to download Export instead of storing on server?
I have created an export header action on my table like this:
This downloads the export straight to
public/storage/filament_export/#/files
.
Is it possible that this would be downloaded to the users device as well, or instead? I don't see anything about this being documented in the Export action documentation:
https://filamentphp.com/docs/3.x/actions/prebuilt-actions/export7 replies
Can someone explain to my why ->dehydrated() works for storing data on disabled fields?
I have been using the
->saveRelationshipsWhenDisabled()
method in my Select
relationship fields, and it has been a life saver!
Now I wanted to mimic this behaviour on a standard TextInput
form field, where I found out that adding ->dehydrated()
after ->disabled()
does exactly that. But after reading the documentation on Field dehydration (https://filamentphp.com/docs/3.x/forms/advanced#field-dehydration) a dozen times, my brain still can't comprehend this concept.
Any help understanding this is highly appreciated!7 replies
How to poll the panel filter tabs when getDefaultActiveTab is dynamic and time based?
In my resources List page I have added my
public function getTabs(): array {}
method, and this getDefaultActiveTab()
method:
Which changes based on time, but the List page does not refresh or poll the active tab by default when the $activeMealType changes.
Is it possibly to add poll the default active tab when using filter tabs, to make sure it live updates?5 replies