Filament

F

Filament

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

Join

error Undefined variable $livewire after upgrading filament and livewire

after upgrading filament and livewire, why i got error Undefined variable $livewire pointing in storage/framework/views blade file I've followed the upgrading steps in livewire and i've run artisan view:clear...

Change navigation icon size

Is there a way to change navigation item icon size? I'm using the FontAwesome's icon set and the default Tailwind w-6 classes for the sidebar's item icons are quite large for me. Instead I'd like to use w-5 so the icons are represented in a more compact look....
Solution:
I think you would have to do this with a custom theme and css.

Any reason TextInput doesn't use CanFixIndistinctState?

creating and using the following class works in my limited testing, wondered if there was a reason? ``` class NewTextInput extends TextInput { use CanFixIndistinctState;...

How to get current tenant in FilamentServiceProvider?

Hi guys, I want to dynamicaly set some NavigationItems based on current tenant. So I need to register them in service provider, but I am not sure, how to access current tenant, becuase this is not working: ```php public function panel(Panel $panel): Panel { $stores = Filament::getTenant()->stores;...

Relation Manager in ListRecords Tab

I have an invoices resource which I have sorted into different tables "To Be invoiced", "Collections" and "Archive". The latter two just filters the invoice table based on the total column, but I want to be invoiced to display the table from my Users resource that don't have any invoices associated with them, any way I could do this? Tried a custom blade template but I suck at styling so it looks nothing like the filament panels.

Import CSV with tags in tags column

Hello there, I'm trying to import csv that has tags in it like "google, bing" e,t,c in a tags column. all other columns are importing properly. But, i'm unable to do that with tags ...

Shield Issue With Resources with same name but different namespaces

Hello, I have an issue with UserResource and Api/UserResource So what happens is that when i remove or add permission for classic non api UserResource it affects the Api/UserResource as well any idea what is causing this?...

Translations

Hi! I am having some trouble translating the following texts with Filament. I've also tried publishing translation files, but I couldn't find those in there: pagination (per page selector, next, previous, showing x to y of z results)...

Using Tailwind 4 alongside with filament

Since Filament 4 will still need some time, I am wondering if I can use Tailwind 4 alongside filament 3? I mean, I wanna use TW4 in my frontend and don't care what version of TW my backend uses.

Drop-down in text input

TextInput::make('assign_to') ->label('Assign to') ->placeholder('Enter Employee Name') ->required() ->reactive()...
Solution:
you can use dataList
No description

I want to have a modal that pops up after the upload of excel file

I basically have a file uploader, and once the excel file is loaded here, there's a button and when clicked, it scans the contents and fills up the repeaters. Now for every product within this excel that is not in the DB (normall I leave them null when filling the repeater) I want to show a modal with a create page where the product code text field is disabled and filled with the unregistered product. By filling this form, user can create a new product and after click 'createAnother' to move to the next product not found in the DB. Once all products are added, THEN, the repeaters would be filled. The problem right now is that while you can create modals on the action, and attach a form to the modal too, I dont know how to make this modal reappear? Here's a code snippet - after the last else if I want to be able to close the modal or refresh it with the next product code essentially. How can I do these?...
No description

Add language code on url with filament with laravel,

hello , i facing to some probleme, we have multi-language problem , and we try to add language code on our url but it's not work , please need help for that , our route statement is : `Route::prefix('{locale}') ->where(['locale' => 'en|fr']) ->middleware(['setLocale', Authenticate::class]) // Use the full namespace ->group(function () { Filament::serving(function () {...

How do you call methods with a Custom Column?

I have been able to make a custom column, but I have been trying to figure out how to actually call methods. If I try to use it like a volt component, it is not able to to see volt functions Clicking here will give "toggleLiveStatus undefined" ```...
Solution:
Yes. But wire: will refer to the component which is the ListPage

Filament's performance

I have some questions about Filament's performance. I'm building an admin panel to manage health information, and while it works, it's quite slow when running locally. I noticed the same issue when testing the Filament demo on my machine. After deploying it to a VPS, the performance improved, but I feel it could be even better. Has anyone faced similar issues? Any tips on optimizing performance? I noticed many requests from Livewire, and those requests are always executed when I navigate through the menu. Their duration is also quite long....
No description

show table loading when filtering data in resource page

Can someone help me to show table loading when filtering data in resource page?

Table deferLoading() and Tests

When using
$table->deferLoading();
$table->deferLoading();
on a table, how refactor our pest tests that check table records? If do something like ```php livewire(MultiUnitUpdates::class, ['propertyManager' => $property_manager]) ->assertCanSeeTableRecords([$floorplan->id])...
Solution:
Oop, just found loadTable() should be used according to the docs.

Placholder component doesn't render state by default

every time I use the Placeholder component I have to manually set the content to the state using Placeholder::make('name')->content(fn($state) => $state) Am I doing something wrong or this is supposed to be default behaviour? if it's default behaviour why is it doesn't have content set to state by default?...

Problems using Repeater in an action

Hello, I'm trying to implement a Repeater with a relationship, the point is that I want to do some validations with the data that is entered in the Repeater before they are saved, my problem is that when I use the mutateRelationshipDataBeforeCreateUsing, it doesn't return the entire array of data that is inside the Repeater, has anyone had something similar happen to them, THANKS Action::make('Regisrar Tramite') ->icon('heroicon-o-clipboard-document-check') ->form([...
No description

Preview quality in Uploadfile grid mode

Hello everyone, does anyone know how I can solve this problem in the UploadFile preview? And also how I can increase the number of columns within the preview grid, please. Thanks.
No description

Resource edit error and black overlay

Hello! I created a resource (data from mssql). Added ONLY a table TextColumn for AccountID and nothing in form. When i open table, data shows correctly, but when i try to edit this record, it opens url, but black screen, more like overlay. And there is JS error. Uncaught SyntaxError: Unexpected end of JSON input...