Filament

F

Filament

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

Join

datepicker initial date

Should be easy, but I can't find a way to set the landing date of the datepicker, trying: ``` DatePicker::make('uc_dob') ->required() ->label('Date of Birth')...

Listing in Resource

Is it possible to remove list in resource, I don't need to show it also I don't need anyone to put the URL and can access it Any solution please...
Solution:
i don't know if this would help but in your list resource you can call this function ```php public static function canAccess(array $parameters = []): bool { return false; ...

foreach loop not working

can someone help me with this loop. it is not working. I am using livewire 3
```<!-- Filter section, show/hide based on section state. --> <div class="pt-6" id="filter-section-1">...

Modal Action not work

```php ->extraModalFooterActions([ Action::make('250dinar') ->label('250 Dinar') ->extraAttributes(['class' => 'w-1/2 !h-full'])...

redirect after edit

Hello all, I have OrganizationResource and I want to redirect to view page after editing, I try many solution but it didn't work. you can find my code in attachments. Thanks in advance....
No description

Adding a "hasOne" relationship in the resource view.

Hello there, from the docs I see there is the option to create a Layout form components that works for the hasOne, but it says: " If the metadata record does not exist, it is automatically created." And i don't want it to be created... So how would I show a "hasOne" record, same way as it the Relation managers shows the related records under the view form? I have to models: Quote and Document, the relation between them is 1:1, and I want to show info of the document in the Quote view, but only if its created previously, I dont wanna it to create auto...

Skip Registration Team if user is an admin?

Hi, Anyone knows how to do it? I try to use a middleware and register it in AuthMiddleware but i got too many redirect error.

how to add custom value in sessions table

I want to add lotitude & logitude in sessions table. I have inserted these values in sessions, but it is not going to the database table. Please help, how to save this values in sessions table?...

how to put a space in summary?

since I can't find a way to change the background color of it or the color of the text, is it possible to adjust the margin from the data to summary?
No description

How to change summary text color?

as you see in the picture, the summary color is plain and hard to see
No description

CanAccessPanel logic causing 403 error for livewire.update on Tenant Registration Form

Dealing with an issue that I think comes down to inexperience. In my development environment, I am working on my logic for what panels a user has access to. in my user model, i have these functions:...

Issue with registerNavigationItems in Octane and RoadRunner

Hi everyone, I’m encountering an issue when trying to display menu items based on user access in an Octane environment with RoadRunner. The problem arises only when using Octane, as everything works fine with a simple web server. The core issue is that Octane boots once and does not clear variables between requests until the worker is reset. This behavior causes old navigation items to persist across requests, leading users to see unrelated menus from previous routes....

unique() and disabled()

Why is unique still ran on a disabled field? Even weirder is that unique(IgnoreRecord: true) is set, so it should pass anyway. if i remove my disabled check and allow input, it saves fine with the existng data.

Dependant TextInput

Hi ladies and gentlemen. I've been looking for the way y can give a TextInput field ('card_id-type') its value depending on the value of a Select field ('card_id). Both values belongs to the same owner. What i need is the TextInput field ('card_id-type') to take its value from its owner. How can i do this?

How to use external JS libs from node_modules into Filament?

We have a open-source project were we want to translate our entire UI to Filament. We need to import some libs from external dependencies on our pages from node_modules which aren't available through CDN's. We are using Vite in our setup.

I need to create total of debits and credits without creating column for it

Hello, I need help on creating total where debits - credits would be the total. I want to put it under remarks. would it be possible?
Solution:
Did you try ``` ->using(fn() => $query->sum('debits') - $query->sum('credits') ...
No description

Is there a way to use filament's table without passing any query, but only an array of data?

Hello, as the title says I just want to use filament table to display a set of data. But also instead of providing the query I just need to pass an array or collection of data. The current implementation of table doesn't fit to my use case since the sorting depends on a custom model attribute. ...

console error with fresh custom widget

I tried following https://filamentphp.com/docs/3.x/panels/dashboard#custom-widgets to create a simple widget that just shows "HELLO" and I managed to do that but then I started getting this error in the console:
Uncaught Snapshot missing on Livewire component with id: AkxP2EcEmJ0jj1qxmGnC
Uncaught Snapshot missing on Livewire component with id: AkxP2EcEmJ0jj1qxmGnC
...
Solution:
it turns out that the issue was caused by spatie/laravel-blade-comments package, just by removing it I was able to get rid of this error

Why is my register page always redirecting to `/users`?

What I am trying to do: Redirect users to my main dashboard page after registering. What I did: ```...

How to Customize Filament Table Queries in Laravel: Help Needed!

Hello everyone, I hope this isn't a repeated or silly question. I've tried various searches but couldn't find the result I was hoping for. I have a table connected to a Laravel model, but the data I want to display in the Filament table is completely customized compared to the classic ->get()->all() that I believe Filament uses by default. To clarify, in my GridJobImportResource resource, I'd like the default query to be this: --- Query in the comment below ---...