Filament

F

Filament

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

Join

Custom page form repeater livewire error: property does not exist

This happens whenever I have a field inside of the repeater, i tested with select and text input ```class PeticaoInicialFormPage extends Page { protected static ?string $navigationIcon = 'heroicon-o-document-text'; ...
Solution:
And then use InteractsWithForms

Rich Text Editor Attachments Not Showing After Uploading

In The RichTextEditor Form Component afte uploading an image as attachment, it uploads successfully in the Storage But not Showin in the Field after that .!

afterStateUpdated in toggle in a custom component not firering

What I want to do I want to have a toggle in my profilenav to switch to an expert mode for extended options. I am using the formbuilder not for its functionality but because of the consistent look and feel / easy way of getting a toggle. What is happening After refreshing the page the toggle is still turned off, even if I interacted with it. When toggleing I do not see any network activity, so I think that toggleing just doesnt do anything....
Solution:
add $this->form->fill() to the mount method

Dispatch open modal with parameters

https://filamentphp.com/docs/3.x/support/blade-components/modal#controlling-a-modal-from-javascript hello everyone, in dispatch, in addition to the id, is there a way to pass other parameters and reuse them inside the content? ...

Man... Filament is so damn slow :(

I've 'done all the debugging I can - queries are fast, and minimal. The time being spent is on the "app" side of things, as reported by Debugbar - meaning it's in PHP. Rest of my site is super fast. I've also cached icons, views, everything - Filament is still taking up to 6s on some pages. 😭...

Connecting filamentphp to google spreadsheet

Hi, how can I connect a filamentphp table with a google spreadsheet, is there something similar to zapier in laravel?

suffix action in the wrong place

my simple code : ``` public static function form(Form $form): Form { return $form...
No description

dynamic actions in table cause visual bug that forces a refresh

I'm not sure why, but after I use a switch the page just wents dark (due to darkmode I guess) but I can't do anything anymore, I have to refresh the whole page. I already tried to refresh the assets, upgrade, clear cache, restart everything, using another browser etc., I just don't understand the issue, because there is also nothing logged. Is there something I miss here? The action itself works without issues, the db entry is updated after the click...
Solution:
Make sure you are on the latest filament version.
No description

How can edit the register account?

Hello friends, I am modifying the register a little, I want to save the plan relationship with the user but for some reason it does not take the onSubmit method, I don't know if this method is correct or not? ``` use App\Models\Plan; use Filament\Forms\Components\Component; use Filament\Forms\Components\Select;...
No description

Filter Not Returning Anything When Nothing is Selected

I am trying to filter my contacts based on what subscription type they have, which is stored in a different table but has foreign key relationships. Here is my code so far: ```php ->modifyQueryUsing(fn (Builder $query) => $query->where('location_id', '=', Session::get('location_id'))) ->filters([ SelectFilter::make('plan_id')...
Solution:
For anyone else with the same problem, I guess the filter just gets passed as "values" instead of the actual type of value, which in my case would have been "plan_id". Here's what a log showed: Filter data: {"values":[]} . From there, I adjusted my code to get the values with $planIds = Arr::get($data, 'values', []); and then check if there was anything there or not with if (!empty($planIds))

Livewire encountered corrupt data when trying to hydrate a component.

Getting this error when trying to submit a specific form action in production. I get no errors when running locally. Livewire encountered corrupt data when trying to hydrate a component. Ensure that the [name, id, data] of the Livewire component wasn't tampered with between requests. ...

How to format a TextColumn

Hello, i need to remove html tags from a specific column. ```php TextColumn::make('body') ->label(__('Body')) ->searchable() ->visibleFrom('md'),...
Solution:
or ```php use Filament\Tables\Columns\TextColumn; use Illuminate\Support\HtmlString;...

Looking for Package or built-in function to get Screen Size in PHP

Hey I've been looking around to find a package or similar to get the screen size . I want to actually hide several components in a form based on screen size. If anybody knows anything any package or function for that, I'd be very thankful....
Solution:
You should add some CSS instead. Otherwise you need to send the data to the server first and rerender based on it.

How to skip Wizard step conditionally?

I have Wizard with steps. I want to skip the step conditionally. For example, skip step if uploaded file is not CSV, I can add logic in afterValidation of step 2. Any help would be appreciated....
No description

Filter Widget based on Active Tab Query

I have a List page with multiple tabs. The List Page also has a Widget in header. Is there a way I can have the widget filter based on the query of the active tab. So when a user switches tab, that tab's query is also applied to the widget, so we are running query only on the shown results...
Solution:
Found Solution: ``` protected function getHeaderWidgets(): array {...

Repeater extra action mobile overflow

Hi all, in repeater, I added extra action. On mobile they still display horizontal overflowing....
No description

CUSTOM PAGE STYLING

Hello everyone I find it difficult styling custom pages in filament its really frustrating, even though I'm using tailwind cas most of the styles I apply to my custom pages, Components or even views are not applied , can anyone help on how solve this? Thanks...
Solution:
In which files do you use the TW classes and are they covered by the content option in tailwind.config (the one next to your theme CSS)

modifyRuleUsing on Repeater

Hey i tried making env_variable unique for each egg->id When there's no variable in db its ok I create a variable with env_variable named "TEST", i hit save its working but if i try to save again without changing anything it thinks that it already exists Here's my branch...
Solution:
you need to enable ignorable true

How to set tags to a TagsInput using $set

Hello i would like some help to set tags using $set i have tried : ```php $set('tags', 'a,tag'); $set('tags', ['a','tag']);...
No description