Filament

F

Filament

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

Join

Unable to download export file

Hi. I am using Filament v3 and Stanc Multi-tenancy v4. If I use Filament export functionality, I keep having : No [App\Models\User] model found. Please bind an authenticatable model to the [Illuminate\Contracts\Auth\Authenticatable] interface in a service provider's [register()] method ...

Inject other field state into viewData on ViewField

Hi, I have a field that is ToggleButtons. I then have another field which is a ViewField which I would like to regenerate depending on the option that is selected in the ToggleButtons field. At the moment, the way that I do this is to use $getRecord() in the view and then look at the value in the toggle field. The problem is that it only updates when the record is saved (as you would expect)....
Solution:
use in the view
{{ $evaluate(fn ($get) => $get('your_toggle')) }}
{{ $evaluate(fn ($get) => $get('your_toggle')) }}
...

How to easily center a label

How can i easily center a label? Without centering it for the hole project, only for one Field in a Form Component? Is there a easy way to center a label? https://filamentphp.com/api/3.x/Filament/Forms/Components/Concerns/HasLabel.html...
Solution:
Finally i just removed the label (by using ->label('') ) and added a Placeholder right above the field, with ->content() and added the Titel there. With HtmlString I could position the Title like I wanted

Custom FileUpload

Is it possible to "fake" the underlying file for FileUpload field? I am connecting with external API and get the file in base64 format. I am saving the file to the temporary disk so I think I should be able to provide the path to the file no problem. I've found getUploadedFileUsing method on FileUpload but it does not seem to fire. Has anyone tried something similar?...
Solution:
If anyone is interested, what I end up doing is a custom component with setUp method overriden like that: ```<?php class CustomFileUpload extends FileUpload...

Programmatically fill repeaters in EditRecord page

Is there a way to fill repeaters in an EditRecord page with some values ? Using ->default() is only possible on a CreateRecord page IIRC. I've tried directly using ```php...

File Upload Issues in Filament: Works in Laravel, Fails with Livewire – Need Help!

I'm having an issue with file uploads and images when using Filament. The uploads work perfectly when using standard Laravel without Filament, but when switching to Filament, the files don't save properly. I suspect the problem might be related to Livewire, but I can't pinpoint the exact cause. Are there any specific settings, Node.js upgrades, or other configurations that I might be missing? Any advice would be appreciated!...

default value on dynamically added form fields

```php Forms\Components\Group::make( function (Get $get) { $collection = $get('component.collection') ?? []; ...

Admin and super admin

We have admin and super admins. For some resources super admin has access to some additional columns which regular admins don't have. Super admins also have a few resources which admin don't have at all. Currently we're controlling this with if statements inside the resources which checks what kind of user it is....

Clicking on a child record in a table to take you to that record - not edit

I have a form edit for a Parent record that has Child records under it. This works well. By default, when you click on a Child record in the table, it edits that record in a modal. I want to change that so that the page moves to the Child record in edit mode. I think something like this would work ->url("/childResourceName/childResourceNameId/edit") , but to do that I would need a value for the childResourceNameId and I don't know how to get that. Or am I trying to code this, and there's a way to configure the Filament table to do this?...

deploying laravel filament app on local machine issues

Hi, i'm about to deploy my app on local server, windows system with xampp. I've build the app for production and putted in the htdocs folder. What i've donne is: ...
No description

Question: How to Customize Filament File Upload Card Layout with Switch for Marking as Main

I'm working on a Filament form to handle file uploads, specifically for images. I need to customize the layout of each uploaded image's card to include an input switch (or a toggle) for adding labels or marking the image as the main image. The goal is: To add an input switch to each image card that lets me mark the image as the main one....

How can I access viewData variables in a view using Alpine.js?

Hello, I need help. I can't read data in the view using viewData, and the documentation does not provide any examples.
No description

redirect after registration on blade file admin panel

redirect after registration on filamane admin panel please help

Navigation Container

Please how do i do something like this, I can create the component using livewire such that onpressed it opens a modal with informations
Solution:
Using a modal blade component and render hooks are probably a good start 🤔
No description

Property type not supported in Livewire for property: [null]

got error when trying to upload image Property type not supported in Livewire for property: [null]
FileUpload::make('image') ->hiddenLabel() ->disk('public') ...

Livewire only works with wire:click

I've been facing the issue where for some reason I can not get wire:modal to work. I've made work around for it now that uses a search button to force the query to run. But I want to use it live version for filtering. I'm using a Livewire component in a custom filament page. ...

Mobile support?

I have a few projects in FilamentPHP and am wondering if there is any mobile view/layout support or if it’s in the pipelines?

Notification broadcast

i read the filament notification broadcast https://filamentphp.com/docs/3.x/notifications/broadcast-notifications i installed pusher successfully but the main problem that i cant find any channel occupied so do i have to do it manualy and if yes how to make filament refresh the notification when it receive a one

Clusters resource with modal action shows the cluster menu again

i have added a modal action in one of my clusters rescources, it works fine, except the modal has the clusters sideboard again.. so its visible twice instead of onyl the modal content, how can i prevent it? i want to show only the modal content

Themes and CSS and Hook Classes

Am I right in thinking using the fi hook classes and custom theme, I still wouldn't be able to influence classes like this one: I'm trying to move a hintaction to be right next to the label. If I change that element line to justify-start, it has the desired result. But I cannot get a custom theme to perform that. Some failed attempts look like this:...
Solution:
Does this infolist-action? support ->extraAtrributes? if yes, you can override maybe. Or you can target nested css like .fi-in-entry-wrp>div.grid>div { @apply !justify-start }