Filament

F

Filament

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

Join

Eager loaded relationship not updating after component action called

I have an action to upload a specific document, in v3 after it was called, my custom entry could use that newly created document via $model->documents but in v4 it does not update. It's like in v3 the whole model would be refreshed including eager loaded relations, but now the relations are cached. I don't want to call $model->documents()->get() because that's going to be a lot of extra database queries (I have quite a few fields), but I need the info to be fresh when an action is run to update the state of the field....
Solution:
Fixed by calling $model->refresh(); after my action is completed. I guess in v3 the caching was more lax, but in v4 it does not refresh the relations etc so you have to do that yourself.

belongsToMany select for relation not working

anyone knows what I'm doing wrong in this Select field with relation BelongsToMany using pivot table public function users() { return $this->belongsToMany(User::class, 'section_users', 'id_section, 'user_id');...

Login page customization

I am new to the Filament. I have setup few resources and it works as expected. However, I want to customize the login and authentication. I want users to enter only TOTP (From Google authenticator App) as password to authenticate him/her. But I can't find views or controller for same. Where are the views/controller stored in Filament so that I can customize it.
Solution:
You have to create a new livewire component and in the panel config ->login(yourcustomloginpage::class)

PreviousUrl Overwritten when Using Multiple Tabs

What I am trying to do: Prevent refreshed browser tabs from inheriting other browser tabs' "previous URL" Our application overrides Filament\Resources\Pages\EditRecord::getRedirectUrl() to redirect to $this->previousUrl after saving, just like in the example in the docs: Customizing redirects.
We've discovered that if a user has multiple tabs open, one of which is on an Edit page, and they navigate around in another tab and then refresh the Edit page tab, the Edit page tab's "previous URL" gets replaced by the other tab's navigation. Does anybody know how to work around this so that each tab keeps it's own "previous URL" regardless of what's happening in other tabs?...

Saving an unsaved id using RelationManager

Hi, I’m building a ticket booking website where each event can have multiple “ticket types.” A ticket type can either be Single or Bundle. Single tickets: regular tickets. Bundle tickets: depend on a “base ticket” (which must be a Single ticket), and when purchased, they multiply the base ticket....

TipTap RichEditor: trouble with lists

I'm editing some HTML rich content under Filament v4. I've observed that the editor makes editing lists nearly impossible if the list items don't contain paragraph tags. To reproduce: My model's data contains the following HTML snippet:...

Customize the topbar

Hi everyone, I’m using Filament v4 and I want to customize the topbar with: 1. A single button to toggle Dark Mode / Light Mode....
Solution:
1. You could hide the current solution in the user menu via CSS and add a new one via a render hook 2. Should be easily doable via a render hook....

Change the position of the Submit button in editRecord

Would it be possible to move the Save changes button that appears at the end of the Form to the end of the report manager Posts list? Thank you.
No description

Customize image html or attributes in RichContentRenderer

Hey! I'm basically trying to lazy-load images in RichEditor content. I tried extending RichContentRenderer and also with "mixin" (like awcodes show me), but I'm not sure if it's even possible......

Nested Resource Header Actions

How can I enable header actions on a nested resource's table under a View-only page? There's no Create button on the Tasks table unless I hit Edit on the project....
No description

Issue with schema reactivity in a custom page

Hello, I'm facing some difficulty in a custom page that loads dynamic schema form a builder. I've managed to reproduce in this simplified example. ...

V4 Repeater - Coloured rows?

Can we colour the rows in v4 repeater? Can't see a method

Just get the original filename?

Is there a way to get the uploaded file's original filename in afterStateUpdated of a FileUpload field? I want to keep the randomly-generated filename, but I want to get the original filename so I can $set() the text of some other fields based on the original filename of the uploaded file.

Hide the column manager

Is there a way to hide the column manager on a table?
Solution:
->columnManager(false) set this on your table
No description

CSS Documentation for Filament themes

Any chance someone knows of a source for CSS documentation that breaks down the CSS selectors used in Filament themes? I've found the core-concepts article that helps, but a comprehensive list would be invaluable. Does such a thing exist?...

table insists on "group by id" if "group by" used -> due to auto appendage of orderBy("id")

Hi all, I am having a challenge with what seems like a simple task. I am trying to create a table off of a query that uses "group by". When the page is displayed I get an error that: Grouping error: 7 ERROR: column "vendor.id" must appear in the GROUP BY clause or be used in an aggregate function...

Need clean code advice : relationManager

Hello, I have a relationManager used to create resources (not just attach them). So I have very large table and form functions....

Multiple panels

How to I make sure when users login, they're redirected to the panel I want?

Accessing Form's without Login

Hey Everyone, Can you please let me know how can we make any custom form accessible for a guest user too just for creating a new record Since every form is locked behind authentication....