Filament

F

Filament

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

Join

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

Export action using multiple guard

❓┊help hello I have 2 table admins an user how can I setup the tables to respond to my request id morph but still not working thanks

CSS Problems

Hey everyone, i have some issues with the css in v4. Like input fields are not rendered correctly and there are some overlapping. images are attached. I already reload the assets but unfortunately without success. Would be great, if someone could help....
Solution:
I found the problem. It was a css file in one of my own plugins. So, thanks for the advice, helped me a lot.
No description

Export action returns incorrect records

When attempting to export records from the view page of one of my resources I'm getting various results when running the export action multiple times. For example when I press the button a few times after each other (each time waiting for the export to finish before starting a new one). The results vary in amount of records, the notification correctly shows X amount of records, but the records in the export are sometimes incorrect and sometimes not. ```php ExportAction::make() ->exporter(ResultExporter::class)...

Error calling table actions in tests

I'm having an issue trying to call table actions in a test. I'm able to assert that the action is visible and hidden in based on policy checks but when actually trying to call the action something is going wrong. In [Filament\Tables\Testing\TestsBulkActions::mountTableBulkAction()](https://github.com/filamentphp/filament/blob/f8d751acb8527abda6abe6f9ee1106dd706a8171/packages/tables/src/Testing/TestsBulkActions.php#L46), $this->instance() is returning null and causing it to crash....
Solution:
If I remove Livewire::setUpdateRoute() then my tests pass. It looks like the Livewire update was failing due to routing issues and then the next component state was null. For now I'll just only modify the update route when not running unit tests and this should work fine for now.
No description

Relation manager ERROR - Filament\Tables\Table::getRecordTitle()

I am Upgrading to V4 and new filament structure ... create new resource, copy everything from old resource ... created new relation manager (attach/detach only) data in table is correct, I see attached models, I can detach models .. BUT ...

Save without closing modal

I need to add new "Create and Continue" and "Save and Continue" buttons to the create / edit modals in a relation manager. This will allow the user to save without the modal closing. I have figured out adding extra actions to the modal, but I am not sure how to perform the regular save/update flow in a custom action (and then prevent the modal closing). ...

How to display static, related info on a form? (I don't want to use a form field set to disabled)

I apologize in advance for what is probably an extremely stupid and simple question but I'm only just starting to get deeper into Filament and trying to do more than just super simple CRUD stuff, and I'm hoping someone can point me in the right direction. Let's say I'm editing a record for a model, the record having been created outside Filament. The record might have a piece of related data from a parent relationship (not v4 terminology, just general development) that I do not want to allow edits to, but I do want to be able to display it. For example: if I'm editing the record for a child, I want to show the parent's name on the form, but only for display purposes; the person editing the form should not be able to update the relationship or anything about the parent. I know theoretically I can do a Section::make()->relationship('...'), etc. and then put a disabled TextInput with the contents in it, but that feels so clunky and I feel like I'm missing something super obvious here. ...
Solution:
maybe use a Placeholder ?

Reset filters when a tab is selected

I have a scenario on a list where I would like the filter form to be reset when a tab is selected. Is that possible? I haven't had much success finding an answer

I want different models to be able to login (User, Patient, Provider)

The goal is that the Admin will create Patients and Providers, which will then be able to login. I have tried a belongsTo relationship for patients and providers to the User but when creating a new Patient or Provider a new user has to be created too (i did it using the modal approach), but the whole process flow is not intuitive. What can I do in such a situation? What I want is that when the Admin creates a new Patient, a related User record is automatically created and linked to it. What's th...
Solution:
Ah well I figured it out. I can just use those fields which belong to the User inside the form for Patient/Provider, and then use mutateFormDataBeforeCreate hook to create the user and assign that user to the newly created Patient/Provider.

[v4] RichEditor (tiptap) always leave a `<p></p>` behind!

not sure dose this consider a bug? since I dont remember the same behavior on adams tiptap plugin. test code: ```php RichEditor::make('details')...
Solution:
I swear I’m handling this some where in my plugin to convert between null and the tag, but can’t find it. 😂 But, yes, it’s expected behavior with Tiptap since it has to have p tag at minimum with prosemirror, otherwise you wouldn’t be able to insert a cursor to start typing....

Is it possible for a filament form button to be an image?

Is it possible for a filament form button to be an image?

Hi, currently, I am using this in my v3 app. May I know what is the equivalent v4 for this?

x-filament-tables::container
x-filament-tables::header-cell
x-filament-tables::container
x-filament-tables::header-cell
...
Solution:
for performance reasons they are not available anymore check the file vendor/filament/tables/resources/views/index.blade.php and you can extract your own component for tables...

SelectColumn it is possible to add allowHtml?

It is possible to add different color options like Form Select? thanks in advance
No description

Dark mode gray

Is it just me that finds the helperText() colors on dark mode almost unreadable? Is there any way to change this?
No description

Getting error Undefined variable $isPasteable

Hi everyone, I suddenly get the above error. The error disappears when I remove/disable the FileUpload functionality in my form. Please help
No description

Api login with user details

Hi all! How can I retrieve authenticated user data after calling "api/auth/login"? #rupadana-api-service...

v4 Rich Text Editor

First off, I am very excited about the v4 release. Big kudos to all the hard work from the Filament team. I watched Nuno's livestream with Dan today and all the updates are awesome. I am very excited for the new Rich Text editor and custom blocks. I migrated an app I am working on to v4 today and dropped the new Rich Text editor in and created a custom block. It's looking great, but there were a couple issues. By default the Rich Text Editor doesn't render a toolbar. I had to specify a toolbar to get it to show. Also, If you include a custom block, it breaks when you try to render it. The editor and form work fine and save, it's just the rendering. I have this on my model: ``` public function setUpRichContent(): void { $this->registerRichContent('content')...
Solution:
I had forgotten that I was configuring the RichEditor component in the AppServiceProvider. In there, I was customizing the toolbar, and it appears to be inpompatible with the v4 editor, so it was just not showing.

Tailwind Classes Not Applying After Upgrading to v4.x

I've been using the following code: ```php ImageEntry::make('avatar') ->disk('s3') ->extraImgAttributes([...
Solution:
If you don't have a custom theme, you need to start with that. Or if those 2 are the only classes, just apply CSS style="border-radius: 1rem; width: 100%;"...