Filament

F

Filament

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

Join

Hi, i need help handling a self referencing table via Select

hi, i'm trying to create a select for a self referencing table, but i seem to have run on some issues, is there a preferred way to do it? looking around most samples i saw did not work if table was empty, or the foreign key had a default value for level 0 of the tree, i wrote it like this: Components\Select::make('parent_id')->relationship('Parent', titleAttribute: 'name' )->default(0), but the selct field says it's invalid
Solution:
Yea so make it nullable.

Add Action Button on Topbar

I tried to add cart button next to the notification icon on topbar. But it didn't work. No modal opens when I clicked it. Here is the code in AppPanelProvider.php ```->renderHook( PanelsRenderHook::GLOBAL_SEARCH_AFTER,...

fresh filament install ui get trouble

anyone know issue about fresh filament install with the problem that the UI doesn't respond well, like something is wrong, I've tried to fix it but it's still the same

How to add description into ImageColumn?

In the table I'm building, I want to show the image, and also a description. How to achieve it?
Solution:
i created a custom field

Showing a modal with list of order products

Hello, I'm trying to show the list of the order products inside a modal using table, I've created a livewire component where I pass my order it and from there in my livewire component table i set a query to bring me a table with order products,...

Hi everyone, I'm having an issue with FilamentPHP's RichEditor component inside a Wizard form.

In my form, I have a RichEditor component inside different tabs (steps) of the wizard. The editor works fine in the first tab, but when I switch to the second or third tab, the RichEditor doesn't seem to load or function properly. Here's a simplified version of my form structure: public static function form(Form $form): Form { return $form->schema([ Forms\Components\Wizard::make()...

How to add blade directive to filament head

I'm currently installing https://github.com/silviolleite/laravel-pwa into my filament app, and I'm at the step where I need to include the blade directive @laravelPWA into the <head> of my page. Here is where I need the directive to go: ```php...
Solution:
You can do this with a renderHook

reload \ refresh relation manager table on page action

Is there not an easy way to refresh the a table displayed by a relation manager, when an action on the resource view page completes ?
Solution:

Help with Builder - no JSON

I am trying to use the Builder without JSON data. I want to use my existing eloquent relationships for the underlying builder. Is this possible? I tried to create a method on my model to return JSON that is a representation of the underlying database data but it doesn't seem to be recognizing that method. I think it is only pulling from the database a column name that matches the Builder::make("insert field here"). Is what I am after possible? Or am I going to have to change the database architecture of my app?...

addAction function called on page load

When I have a repeater with an addAction function. When I load the page with the repeater on it the addAction code is executed. I would expect this to be called only when pressing the action button.
->addAction(function ($livewire, $component) { dump('test');})
->addAction(function ($livewire, $component) { dump('test');})
...

Database notifications in database but not rendering on page

I am unsure where to even begin to look here. Database notifications are being written to the notifications table but they are not subsequently reflecting in the interface. The counter remains at 0 and clicking the bell/refreshing and clicking yields no change in results. I'm a tad new to Filament/PHP but I am learning quick. I look forward to any and all help!...
Solution:
Figured it out - was missing sendToDatabase() because I'm a dummy - Thank you!!!

Spatie Settings Checkboxlist

Hello all. As part of my steep learning curve, I've decided to build a new Filament Startup Kit adding some interesting features which might be useful for any DEV to use as a starter. So after setting up Filament Admin Panel with Jetstream to allow 2FA, it was time for Spatie Settings which would allow any project to have an easy to implement/edit/adapt Settings page. To mimic the appearance of other settings pages we are used to (e.g. Wordpress etc). I've decided to use a single group, so added a few input variables in /app/Settings/GeneralSettings.php and then added the GeneralSettingsPage.php which would hold the input forms to store the data. Also added a migration to supply the required columns. To separate/group some settings logically I decided to use tabs which are easy to implement and allow the required functionality. So with that I decided that it will be great to add an example for every Form input there is with Filament and it all worked perfectly fine to store and show the stored data on the Settings page utntil I reached the CheckboxList input....
No description

Calling livewire component from xdata

I am writing a ResizeableTextColumn component for use in Filament Resource table This is a sample of usage```return $table ->columns([ ResizeableTextColumn::make('name') ->searchable()...

Table Tabs in RelationManager

How can i achieve the same result as the GetTabs from a resource ListPage in a relation manager? im referring to https://filamentphp.com/docs/3.x/panels/resources/listing-records#using-tabs-to-filter-the-records...
Solution:
if anyone falls in this thread, you should just do the same as described in the link

Map Picker by DotSwan not fetching coordinates

This is the code, created the migrations for latitude and longitude as stated in the docs. ```php Map::make('location') ->label('Location')...

script in modalContent(view('qr-scanner.php')) not working

Hello I am trying to integrate this package into filament action modal https://github.com/mebjas/html5-qrcode ``` Actions\Action::make('openModal')...
Solution:
add to the appserviceprovider ```php public function boot(): void {...

Date + Time Steppers / Meridiem

I'm cannot find a happy solution between using the native HTML5 datetime vs Filament's datetime implementation. - I'm in U.S. and 12 hour clock (with meridien) doesn't seem to be possible with ->native(false) - But when using the native HTML5 datetime steppers don't work: ->minutesStep(5) Anybody else facing these annoyances and find solutions? ...

Is there a way to restyle <x-filament::button> and other filament components?

Hello! I want to restyle all of the filament components. How would I go about doing this? Should I publish the views?