Filament

F

Filament

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

Join

Stop FilePond from appending -v<number> to file names

I'm in the process of customizing the ralphjsmit media library plugin for my needs and i noticed that my file names are always changed to be appended with -v<number> once i edit them through the ->imageEditor method of the underlying SpatieMediaLibraryFileUpload component. I managed to track the issue to the filepond configuration in the vendor/filament/forms/resources/js/components/file-upload.js file to be exact on the line 689 : ```js this.$nextTick(() => {...

database notifications conditionally hide mark as unread/read button

I can add those buttons to a notification, but I only want it to be rendered if it is actually needed. If the notification is read. I don't know how I can inject a dependency in the closure, so I can conditionally hide it ```php ->actions([ Action::make('markAsRead') ->button()...

I am currently getting a CORS message in my console on my subdomains

Access to script at 'https://cyber.com/js/filament/forms/components/select.js?v=3.2.131.0' from origin 'https://is.cyber.com' has been blocked by CORS policy: No 'Access-Control-Allow-Origin' header is present on the requested resource....

ActionGroup in infolist

I'm trying to add an ActionGroup in headerActions() in an infolist. But I get this error: Method Filament\Actions\ActionGroup::getName does not exist. Is ActionGroup not supported in InfoList?...
Solution:
Nope, ActionGroup is not supported in infolists

problem with exel uploader

I have form like this image is. I'm using EightyNine ExcelImport framework to import exel file. this is pivot table like i have holding company table and pivot table for this holding company dircetors, one holding company may have many directors with active statuses, i want to write all this in my exel file and next import it. my code at this moment looks like that ``` \EightyNine\ExcelImport\ExcelImportAction::make() ->label('ექსელის ატვირთვა') ->sampleExcel( sampleData: [ ['internal_company_name', 'identification_code', 'holding_company_id', 'director_id', 'is_active'],...
No description

Filament exports under fly.io

Hello everyone, I don't know if any of you host your filament app on fly.io. I'm now running into the problem that I can't set up the export properly. Filament normally uses queued jobs for this. When I use the sync connection, the files are created, but my app reports HTTP 419 “This page has expired”. I tried using the database connector instead, but this requires a worker to be running to process the jobs. Now fly.io is designed to use a separate process for such tasks. However, the volumes available on fly.io can only ever be connected to one of the processes (or machines in the background). This means that when exporting with the queue, the export files are created correctly on the worker storage and I even receive a notification in my app. But of course I can't download them in the app because they are on the worker storage....

Cancell file upload

Hi. How can I cancel the file upload to FileUpload? The verification condition is as follows: if the name of the uploaded file is not found in the database, then cancel its download. ```protected function getFormSchema(): array { $currentTenantId = Filament::getTenant()->id;...
Solution:
I think you can use a custom rule, because the file is moved when you submit the form ```php FileUpload::make('attachments') ......

Change black/white favicon depend on browser dark theme

If an user have the dark theme enabled on the browser, the tabs are dark, so i want to show a black favicon in white mode, and a white favicon in dark mode. Is that posible? I see that documentation https://filamentphp.com/docs/3.x/panels/themes#adding-a-favicon...

Filament shield - Permission management

Hi everyone! I need help with Filament Shield's permission management. I'm trying to implement role-specific resource exclusions in the permission list. Specifically, when a Manager role is creating/editing other roles, I want to hide certain resources from the permissions list that they shouldn't be able to assign. The base exclusions from filament-shield.php work fine, but I am not able to give role-specific exclusions....

Big Reports in Filament

Can anyone give me an idea about how to create reports which have lots of data and calculation in it. Right now the report is taking about a minute to load due to the calculations, even without calculations with the amount of data it takes longer. Is there a way to generate report with filament table header and then show the data?

Sidebar Overlapping Navbar

I am experiencing a problem with the layout. When I open a component that is taller or larger than the current view and scroll down, the sidebar moves along with it and covers the navbar. I have removed my custom theme and the sidebarCollapsibleOnDesktop() function, so I don't think that's the issue. I also haven’t overwritten any views or made any unusual changes. I’ve noticed that this also happens in the demo application. Does anyone know what might be causing this? Thank you in advance.
No description

tiptapeditor

i am using tiptapeditor but when i submit something then it doesn't get stored in the database. this is in the resource ```TiptapEditor::make('description')...

Action Group Layout

Does anyone know a way to achieve the attached button layout within filament? I've tried to use an action group but I'd have to add a button and then an action group and there's a space between them. Ideally, I'd like the button and the action group connected. The scenario is that I'd have a "Send Email" button, then in the dropdown bit would be 3 dots and in that dropdown there would be Send SMS, Call etc. Essentially, email will be used most of the time, and so I don't want the user to have to click the action group dropdown every time. Thanks...
No description

Infolists / Action button

Hi I have been following a tutorial here: https://laracasts.com/series/rapid-laravel-development-with-filament/episodes/14 I have followed the example and with this function in my controller I get the slideover with the named field ...

logout going to http

Hi I am working on a fairly new system, and in my local dev environment, everything is done over HTTP, which is fine, however, when it goes into prod, we have it setup on HTTPS. The odd thing is whenever I click the profile and log out, I get a screen saying "The information you are about to submit is not secure" with 2 buttons "Send anyway" and "Go Back"....

How do i Log/Auditrail Logout activity by user?

I managed to Log Login by Overriding the login pages just like in the picture, but now i want to log the logout activity too, but i dont know where and which file to override ?
No description

Reactive Behavior Not Working for Fields Inside Repeater

hi i just started a discussion on github https://github.com/filamentphp/filament/discussions/15282 I am working on a project using Filament PHP and I have this layout:...

cant hide depending on the role in my policy

Hi how can i hide the activity log depending on the role of the user? i tried in appserviceprovider.php but no luck. ...
No description

Filament forms and Model::shouldBeStrict();

With following setting in AppServiceProvider: ``` private function configureModels(): void {...

Do not reload the table in the background when interacting with an Action Modal Form

What I am trying to do: there is a table with a specific set of filters that has an expensive DB query. In that table each record/row has an action available, which opens a modal with a form, and some of the form components are live/reactive. The problem is that with every interaction within that form, it is very slow and adds a lot of load to the DB because the table in the background gets refreshed with every update, running an expensive DB query. Is there no way to isolate so that the Action updates are only concerned with the components/data within that Action component and not the whole page/table? What I did: I tried adding #[Isolated] attribute on the Action class as well as ->deferLoading() on the Table but neither works....