Filament

F

Filament

Filament is a collection of beautiful full-stack components for Laravel.You can get help using it on our Discord.

Join

Run a javascript function when table is redrawn

I have an external tool that adds tooltips to links when a page loads. The problem is, if Filament re-orders or filters the rows, thus updating the page content, the links vanish when the content is re-drawn. I found a function in the tool to trigger the modification of links, but I now need to know how I can have that javascript function run after filament updates the table contents....

Will it be possible to use jetstream with filamentphp

I want to edit, register, and use all Jetstream features within the Filamentphp dashboard, is it possible to do that? I installed a plugin, but it doesn't do anything :fi:...

How do i register a user for 2nd panel from admin panel?

So im building a 3 panel app , 1st admin, 2nd mentor, 3rd interns, Only interns login panel have a registration() button, the admin and mentor login panel doesn't have the registration(), Im planning to add the mentor panel user from admin panel menu, so like registering mentor email & password from admin side,...

nested repeater extraItemActions

I have 2 nested repeaters and on the second I have extraItemActions and I have mountUsing and the $record for somereason is the data from the parent repeater and not the child here is the code: Repeater::make('Tasklists') ->relationship('tasklists')...

preload com getSearchResults

Is there a way to preload a getSearchResults Using or modifyQueryUsing?

Adding CSS to table group label/name

How can I add formatting such as bolt text or a specific color, a border/background, etc to the lables a table puts on groups? (when using ->defaultGroup(Tables\Grouping\Group::make()) There id not appear to be a ->badge() or ->html() like there was for table columns....

Table group of groups?

Is it possible to nest grouping or groups in tables? I basically have a pivot table that lists a number of items and links them to a listing of people. Each of the items relates to a given location. So basically I have something like:...

conditionally set dark mode

is it possible to set dark mode based on certain config? I want to disable the theme mode switcher and set the dark mode based on a setting from laravel settings, but I can't figure out how to do it (as the darkMode method do not accept closure)
Solution:
I think you can use something like this to handle it ```php if ($xx) { filament()->getPanel('xx')->darkMode(true);...

Use a JavaScript function in a form field?

I have a function for NFC, which reads a NFC tag and fetches its serial number. This serial number needs to be input in the field. How would i go about that?

Caching record in creation

Good day, how do I cache a record when I want to return to it before saving it as a record?

ActionGroups and Testing

When asserting that a table action exists, is it handled any differently when an action group is involved? Having an issue asserting that an ImportAction exists in an ActionGroup on a table header. Says it cant find it.

Could not save other model relation data

I have a product model and productpromotion model, product model will have many promotions, how can we save relation from productmodel resource ? Group::make() ->relationship('promotion') ->schema([ TextInput::make('promotion_label')...

Relation Manager Alpine Expression Error: selectedRecords is not defined

On the frontend in my relation manager I have an alpine error: ```php livewire.js?id=cc800bf4:1125 Alpine Expression Error: selectedRecords is not defined Expression: "false || (selectedRecords.length && 1)"...

Pass Model to re-useable Table Action

I've got a delete action which is repeated in various places. I want write the component in a helper class and then call it into the getTableActions array as required. To do this, I need to pass the model, but I can't make it work, it is passing a closure....
Solution:
The handler is separate. I've worked it out! I was overcomplicating this...I thought I'd have to pass the $record into deleteApplication function so it can return the Action::make('deleteApplication')...

Help with Wizard layout!!!

This is how my create page looks like…. I’d like to open it wide
Solution:
Wizard::make('my_wizard')->columnSpanFull()
No description

Table and getting counts of records (groupBy)

I have a table widget. It generates a list of mobile device models and the number of mobiles of that given model. In doing this I can't search or sort because the query isn't something filament can modify for searching and sorting. I get the 'column: count doesn't exist`. Is there a "Filament" approved way of accomplishing this? This is my widget: ```php class SolarwindsMobileByModelTable extends BaseWidget {...
No description

Spatie tag name text input field

Hello all, I have created a resource for the spatie tag model: ``` use Spatie\Tags\Tag; class TagResource extends Resource...

Logout Middleware

I had added a new middleware to my AdminPanelProvider. It redirects a user to their profile page if their profile is not complete. I have removed the Middleware from my EditProfile page. ...
Solution:
In your middleware handle function do it something like this ``` if ( $request->routeIs('filament.admin.auth.logout') ) return $next($request); }...

Show loader on table component render only.

Here loader shows on every server request like when open delete modal, deletign task, etc. I want to show loader only on table component rendering. I have added blade and class below. Thank you. Blade: ``` <div>...

Filament repeater pop up

I have a filament repeater and i want to open a popup to show more details about the card. I prefer not to use blade file and achieve it with built in filament functionality. Can someone help me?
Solution:
Use an action on the repeater