nanopanda
Filament exports under fly.io
@johny7 I'm vanilla S3 rather than Tigris. I created the CORS configuration for my bucket via AWS Console. You may also need to set FILAMENT_FILESYSTEM_DISK in your fly.toml.
https://filamentphp.com/docs/3.x/forms/fields/file-upload#configuring-the-storage-disk-and-directory
Aside from that, I have a private S3 disk defined named 'assets', and my FileUpload config looks like this:
12 replies
Filament exports under fly.io
@johny7 Not directly related to your question, but I have a Filament app deployed on Fly.io with many export actions, file uploads, etc. I use sync for local dev, but AWS ( SQS, S3 ) for queue and shared storage needs. Also have small cpu-1x machines for cron and worker(s).
12 replies
Man... Filament is so damn slow :(
What are your dev/production environments like? Have you tried running the filament-demo project?
For example, I'm using Laravel Sail on an M3 Pro Macbook and most pages are 2-300ms, depending on query complexity.
Any external services/APIs being called?
30 replies
Insert import and export button here!
@Mokatchi Icon is just from the action config, like:
ExportAction::make()->icon('heroicon-o-document-arrow-down')
The name is automatically added based on the $model static var from the Exporter class, but you can override that with ->label() config as well7 replies
Searchable MorphTo
Having a relation named 'model' seems like it might break something, or at the very least be confusing. I'm not sure on your specific error here, but you can pass a closure to searchable() and override the query to search specific columns of your MorphTo models.
5 replies
Grouping Rows with Closure/Tree relation
I'm not sure how getKeyFromRecordUsing functions internally, but based on your output it looks like it's still doing the actual group partitioning based on the "name" attribute of the product. I think you would need to make the attribute passed in to Group::make() an actual relation, like "parent.name" for the DB query to be output correctly.
6 replies
Full page loading
@Dennyvik Hmm, have you traced why the modal takes so long to display? I tested a similar column Action structure to your code above, without your $record logic. The modal works normally, and if I add some very slow filters to my table, then the spinner will show correctly before the modal is displayed. Did you add the RenderHook on PanelsRenderHook::FOOTER in your PanelProvider? Any custom theme styles that might conflict?
19 replies
Full page loading
@Xavi I just hacked up the markup from the example:
<div
x-cloak
x-show="$store.isLoading.value"
class="h-screen w-screen fixed bg-gray-950/50 left-1/2 -translate-x-1/2 z-[6000001]"
>
<div class="absolute top-1/2 -translate-y-3/4 left-1/2">
<h2 class="text-center text-gray-400 font-bold text-2xl">Loading...</h2>
<x-filament::loading-indicator
class="w-72 h-72 text-center"
/>
</div>
19 replies
table inside tabs its possible?
I may be wrong, but your top level tabs seem to more of a top Navigation? In that case you can use ->topNavigation() on your Filament PanelProvider to get a similar effect, although I think the default sidebar nav is more flexible and generally a better approach for a Filament app.
Also, while you can likely achieve something close to your screenshot by creating custom Pages and a blade template wrapper, it will probably take a lot more work to get there vs. leveraging the UX of Filament's built-in layout + components.
35 replies
Full page loading
@Xavi I recently implemented the example from Lara Zeus (many thx!!) and it works great. I set the timeout at 1500ms and changed the markup so that the spinner is center screen and masks the entire window from additional clicks.
19 replies
How to avoid showing all widgets on all dashboard pages?
@nowak FWIW, my app has a main dashboard and 4 additional dashboards grouped under an "Analytics" navigationGroup. The analytics dashboards have their own collections of widgets that have specific filter form criteria and are tailored to specifc types of data / Models. All you really need to do is override the getWidgets() method in your Dashboard classes to include only the widgets that you want. If you want Shield permssions for individual widgets ( not just the Dashboard pages ) then you'll still need to register all of them in your panel provider. I also have my Models ( and their Policies ) in sub-folders by functional area, with Resources and Widgets following the same structural pattern.
38 replies
SelectFilter doesn't working
The name passed to make() should be the column name. See below in the docs. Also, options() expects an array, so if you have an enum you may need a method to convert the cases like this:
public static function filterOptions(): array {
return array_column(self::cases(), "value", "name");
}
"Select filters do not require a custom query() method. The column name used to scope the query is the name of the filter. To customize this, you may use the attribute() method:"
6 replies