Filament

F

Filament

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

Join

Globally configure database notifications to use `isEventDispatched: true`

Hi all Currently I have to pass in isEventDispatched: true whenever I send database notifications. Is there a way of setting that flag to true via configureUsing ?...

Can you help me understand the process of creating custom pages.

Part of my app, I would like to display a list of models related to the parent resource. Lets just use Users who like a Hobby for an example. First thought would be to create a relationship manager. And I can get the list of users to display. But If users should have control of their own profile, I don't need the standard user management screen. I believe info lists are likely what is needed for this. As most data will be read only, but there also needs to be a few moderation options available for admin. ...

Some items from Repeater not saving

I have Repeater with some nested Select but something really weird is happening. These nested Selects are “rules” for validating coupons. Some save perfectly but others always save the “value” field null and after I reload the page and save again they save the value normally. The category_specific and product_specific fields are only saved after the 2nd time....
No description

Select Divider/Separator (<hr>)

How it is possible to add a separator to a select component. With plain HTML I would add <hr> but if I try to do that here then an extra blank option is added to the list. The code below produces the screenshot attached. ```php Components\Select::make('invites') ->options([...
No description

ChartJS custom tooltip positioner

To add a plugin to chartjs as Filament docs say I use the filamentChartJsPlugins array. Id like also to register a cutsom positioner for the tooltip. As chartJS doc I must hook into Tooltip object. Is that possible to do this with Filament ? ChartJS doc example to add a custom positoner: ```js import { Tooltip } from 'chart.js';...

Table Styling Problem Livewire

Why i get this bad styling issue? the per site is broken
No description

Dynamic `required()`/`visible()` within a Repeater

I've got a Form with Select: ```php return $form ->schema([ Select::make('event_id')...

Disable User Menu on Guest Panel

Hi! I create a guest panel (without authentication) and i want to disable user menu and replace it to an "Go to dashboard button". So In GuestPanel, i use PanelsRenderHook::TOPBAR_END hook to add my button. ...

Update text input dynamic based off other important

I have this form schema ```php Toggle::make('includeTable') ->label('Include table') ->default(true)...

Spatie translatable plugin issue or not

How to pass default locales from a database? Although, code below works, but it breaks the application when you try to run for example php artisan migrate on a fresh database. ```php ->plugin( SpatieLaravelTranslatablePlugin::make()...

Adding where clause to query using current session

Can I always filter UserResource rows to only rows that belong to the same group as the current logged in user ($query->where('group_id', auth()->user()->group_id)? Where would I apply such a where clause? getTableQuery says deprecated — Override the table() method to configure the table so I'm not sure how to do it 🤔
Solution:
Possibly working with $table->modifyQueryUsing(function (Builder $query) {}) 🤔

when create data redirect to route print and redirect to index

hi anyone know how solve that case? i want after create the record i want print the invoice and redirect to index...

Table groups with 5 newest rows per group

When using table groups is it possible to limit each group to 5 newest rows? 🤔
Solution:
Doubtful.. we would need multiple sub selects to the best of my knowledge

Livewire Table action redirect the table ?

I don't really know what to write in the table but I found this strange behavior including a livewire table into a filament resource form, does anybody knows why? I'll write a snippet but I saw that it happens with all forms.

Strange php artisan optimize error

Hi there, so when i use this command on forge: php artisan optimize I get this error: INFO Caching framework bootstrap, configuration, and metadata. ...
Solution:
I had these recently, add this service provider: ```php <?php...

Searching for the plugin or piece of code to chose and register a store

I'm looking for the plugin or the item in the documentation of how to setup something like the store in the left top corner of the page. I want to use it for multiple journals system but I can't seem to find how I can do it.
Solution:
that's called Filament Tenancy.....
No description

Hello caching for dashbord filamentphp

How we can setup caching for query for make best performance in dashboard public static function getEloquentQuery(): Builder { return parent::getEloquentQuery()...

Searchable by pivot name

In a relationmanager I have records with column name and a pivot column name. How do i make the table searchable by the pivot column? I already tried Tables\Columns\TextColumn::make('name')->searchable() (column works, search doesn't), Tables\Columns\TextColumn::make('pivot.name')->searchable() (column works, search doesn't) and Tables\Columns\TextColumn::make('pivot_table_name.name')->searchable() (neither works)....
Solution:
Had to define searchable(['pivot_table_name.name']) instead

Chunking bulk actions

We have a resource with around 20k models. When trying to do bulk actions we hit php memory limits due to the size of the models. We are migrating from Nova to Filament with this. Is there a way to chunk the action? The records themselves don't need to be queried directly but can be retrieved later when we fire the jobs....

text to speech not working on chrome,safari and opera browser.it'sonly working on firefox

my code Livewire.on('display-sound', (response) => { if ( 'speechSynthesis' in window ) {...