Filament

F

Filament

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

Join
Mmalivodka4/29/2024

How to hide drop down on menus?

I have this menu on my multi tenancy app I want to hide this and show only to a specific user or role.. How can I hide this?...
No description
Aacroninja4/29/2024

Is it possible to defer loading of panel service providers?

I have different panels on different domains, there's no point loading other panels.
KKaan4/29/2024

Call to undefined method App\Models\Category::category_image()

Hi. I'm using this package for the media library: https://filamentphp.com/plugins/awcodes-curator In my CategoryResource, i'm trying to insert a form data with image. Here's my CategoryResource > Form Method: ```php public static function form(Form $form): Form...
KKaan4/28/2024

Awcodes | Curator Image Upload Error

Hello. Whenever I try to upload and save an image on the create page, I get the following error: ```php SQLSTATE[HY000]: General error: 1 table media has no column named alt INSERT INTO "media" (...
Solution:
Yes, sorry my stupidity. 4 days ago I installed spatie's media librrary and they were in conflict ๐Ÿ™‚
SSkrypt4/28/2024

Navigation Builder Parent Item / Child Items

Hi, can anyone be so kind to explain how this is supposed to work? I know that inside of resources, I can simply add the navigationParentItem property and the auto-generated filament navigation will build it correctly. But for various reasons I'm building the navigation myself (by calling ->navigation() on the panel), but I can't get the 3rd level items to work....
SSydd4/28/2024

TextEntry roles badge translations

Dear all, please advice me, how to translate roles in TextEntry badges ..., I'm try but, it's dont work, returned values as stored in DB. TextEntry::make(('app.role.roles')) ->label(('app.role.roles')) ->badge() ->color('primary') ->separator(','),...
Solution:
Solved:
Jjanibek4/28/2024

Actions pop showing on server too large width

Action button clicks pop acttions view too large width. how to fix it? pls help on prodcution server
No description
Ccenglyy4/28/2024

Modal View with Relationship

Hello, I show the views in a modal instead of showing them on a separate page, the relationship data I set up here does not come in somehow, but it comes if I turn off the modal service, how can I activate this?
AAndi4/28/2024

Table summary not working for accessors

Hello I try to build a summary for an accessor, which counts an amount of a hasMany relationship. ```php Tables\Columns\TextColumn::make('totalValue')...
TTheNastyPasty4/28/2024

numeric() function casts represents number with comma and not with dot

I don't know why but the numeric function casts somehow the dot notation to comma representation. Maybe someone knows why that is? ``` TextInput::make('armortizing_interest_rate')...
ZZoltes4/28/2024

Combining preloaded options and search results in Forms\Components\Select

Good day, everyone! I would like to improve user experience with choosing a client from a list in a resource form. The current solution is based on getSearchResultsUsing. I do search in the DB when user enters a few chars. However, the delay for the search is a bit worse than I used to have in my old admin panel with React. I would like to preload 50-100 most frequent clients in the Select to get instant search results, but I still need to append the Select list with the other not so frequent clients I found in the DB when the user types something in the input....
AArjan4/28/2024

Current model in RepeatableEntry

How do I get the current model in a RepeatableEntry so I can use it in url()?
AYAdnan Yalahow4/28/2024

how can i add requiresConfirmation when creating records

i have trid this ```php protected function getCreateFormAction(): Action { return Action::make('create') ->action('create')...
STSujal Tamrakar4/28/2024

Uploading new image to a prefilled spatie media file upload not working in custom page with forms

I have a custom page with forms. I have multiple file inputs. The file inputs successfully shows the uploaded images. But when I try to upload another image to the same input, the input loses the previous image and the input empties itself. The submit button gets stuck in the uploading image state.
TTetracyclic4/28/2024

Select::selectablePlaceholder(false) not working with relationships

I have the following select component, which correctly displays as a list of the user's leads, with the first item always selected: ```php Components\Select::make('lead_id') ->relationship('lead', 'name', fn (): Builder => Lead::query()->where('user_id', auth()->user()->id))...
GGavTheDev4/28/2024

Select HasMany relationship with CreateOption

According to the docs the ability to create a new option on the fly only supports BelongsTo and BelongsToMany relations, but my use-case is a HasMany. I have been experimenting but nothing seems to work unfortunately. How can I get a HasMany to work? What I am trying to achieve is a checkout form where an authed user can select a shipping address, and if it does not exist they could create one on the fly. ```php...
Aabdullafahem4/28/2024

Relation Manager not in modal

I need from a Relation Manager to be open not in a modal but in a new page, but that page should have another Relation Manager down. Is there any solution?
Yyassensayed.4/28/2024

How to return the Wizard to step 1 after create success in custom page.

Hello, I have created a custom page using the form following schema this form saves the data into external API. ```php Wizard::make([ Wizard\Step::make('Order') ->schema([...
Zzenepay4/28/2024

Having issues with spa() and https and logout

When put URL::forceScheme('https') in boot() in AppServiceProvider, my panel spa() does not work. But when I remove URL::forceScheme('https') I cannot click Logout. It returns The GET method is not supported for route admin/logout. Supported methods: POST. I found that the logout function send http:// instead so it does not work with https url. Please advise how I can handdle the logout function to work, so I can remove URL::forceSechema('https') #logout #spa #https...
Aabrardev994/28/2024

Dynamic Form Validations

Hi, We stored different validations in database. How can we dynamically apply Filament field validations based on selected DB record. For example
->acceptedFileTypes(fn(Forms\Get $get) => MediaConfiguration::where('collection_name', $get('purpose'))->first()?->mime_types ?? ['image/*'])
->acceptedFileTypes(fn(Forms\Get $get) => MediaConfiguration::where('collection_name', $get('purpose'))->first()?->mime_types ?? ['image/*'])
...
Next