Filament

F

Filament

A powerful open source UI framework for Laravel • Build and ship admin panels & apps fast with Livewire

Join

Why did my filament dark theme become blue?

It was black and now become dark blue
No description

Refresh infolist repeater containing a relationship on action

Hey, I was wondering if there are any methods to refresh a repeater in an infolist through an action I've got an action (inside the infolist, not on header) that is adding records to the relationship and should refresh the repeater so that they will show but nothing happens ...

Multilanguage fields

Hi, I need some advice on how to handle multi-language fields in Filament. I have models like Country and CountryTranslation, and I will have dozens of similar models with translations. I created a helper that generates a Repeater, sets up the hasMany relationship, and disables the ability to add or delete rows. You can see the code here:...

Why do I need VPN to access filamentphp.com ?

For the past 48 hours i noticed Filamentphp.com isn't accessible, so I thought maybe i should try out a VPN first and then the website popsout ? Can I know why ? I'm located in Algeria. Thanks...

CreateUsingOption() not getting relation in $data

Hello everyone, I am stuck here. I have in a TableRepeater in which I have a Select with a createOptionForm and a createOptionUsing. So it kind of works... I mean, createOptionForm creates the form, I can fill it up normally and when I save it creates the new record. Good BUT, in this record I want to save, I have a relationship (in a Section) and this relation is not saved at all. Neither I get the relation in $data that I pass to createOptionUsing($data). ```php Select::make('relation_type_id') ->options(function () use () {...
Solution:
I think you can use ->dehydrated() to get the values instead of saving them directly.

How do I call an icon from custom page view ?

I have a custom page and I am trying to accomplish putting an icon to the row but it doesn't work. why? ```html <td class="px-4 py-2.5"> <a href="#" wire:sortable-group.handle class="cursor-grab">...
No description

Disable filament upgrade script from importing absolute classes

Is there any way to keep filament v4 upgrade script from turning all usages of new \App\Models\User; to use App\Models\User; ... new User;?
Solution:
I think that would be way more work on our side and it can be fixed with Pint.

Actions in Infolist with Tabs: Action don't seem to work

Hy everyone. I'm having issues by trying to set actions (suffixActions) on an Infolist, that already have set a couple of tabs . The (form) modals defined in the actions just dont show when I click in the action. No errors, neither on screen nor in the browser's console. ...

How to apply Laravel Policy to Filament Actions (Export/Import/Custom Actions)?

Hi everyone 👋 I'm using FilamentPHP and trying to integrate Laravel Policies into my actions, both default (like Export/Import) and custom ones (like a PublishPost action on a PostResource). ---...

Undefined property: App\Filament\Pages\SettingsPage::$form

```php class SettingsPage extends Page implements HasForms { use InteractsWithForms;...
Solution:
for some reason just refreshing the page solved the problem lol got no idea what happen

Returning Action in renderHook

In v3 you could return an Action::make()->render() in a renderHook but with v4 it complains about the iconPosition not being set (views/components/buttons/index.blade.php:38) I know i could make a livewire component, but for a simple action it seems overkill. Anyone got any ideas how to render an Action in a hook?...

Filament notifications & Spatie LogsActivity

Hi I'm currently using Spatie's LogsActivity and I'm wondering if it's possible to integrate it with Filament notifications. Specifically, I'd like to log the creation and deletion events of these notifications
No description

Downsides of SPA mode

Are there any downsides to using SPA mode? It does make things noticeably more snappy. I assume there are since it isn’t on my default.

Use inputs outside a form

Im creating a dynamic form lots of alpine and i want to use the filament form elements for it, just simple input and selects, how can i do that? its mainly to keep a consistent style with the rest of the forms
Solution:
These are the available blade components in v3. Not everything has a blade component. https://filamentphp.com/docs/3.x/support/blade-components/overview

V4 Custom Page with Custom Data Table

Hey all, I'm working on a project where I'm trying to use the V4 beta of Filament to display a table based on API data. I'm running into some issues where it looks to be trying to load relations from the response collection even though the items are not models and its not associated with a resource. Here is my custom page / table implementation:...
Solution:
Actually I just figured this out... if any field that is returned is null, it tries to find it via a relationship. My workaround for this is to set the state to an empty string.
No description

Can't get scatter chart to work?

Does anyone have an example of getting the scatter chart to work in a widget? Mine doesn't. This is how I've formatted my data as an example: ```php protected function getData(): array {...
Solution:
nvm, I'm using it wrong.
Unlike the line chart where data can be supplied in two different formats, the scatter chart only accepts data in a point format...

Need a tutorial to update a plugin v3 to v4 ?

I'm trying to start updating my plugin v3 to v4 (https://github.com/webplusmultimedia/filament-json-media ). Unfortunatly, the upgrade commande is ok, but the render is completly broken. what i've got :...
No description

Relationship is empty after save

After saving a form that contains a relationship the relationship section is empty. The data is correctly stored and fetched but filament clear the data.ralationship node by filling all the components states with null values. I've tried to trace the issue out and I've seen that: EditRecord.php call the $this->form->getState()....

How do I set Filament to upload the full URL to the database for a cloud storage provider like S3

Hey. When using the file upload component and I set the cloud storage provider to something like S3, it stores the file path,not the full URL. I already have a bunch of items in the database that stores the URL and I'd like Filament to do the same. How can I achieve this?...

How to default a navigation group to collapsed on first load?

->navigationGroups([ NavigationGroup::make() ->label('Users') ->icon('heroicon‑o-users') ->collapsible()...
Solution:
yeah, by modifying localstorage key collapsedGroups in render hook resolved the issue. Here is my updated code in panelprovider https://codeshare.io/5Od9Dr...
No description