danzzz
danzzz
FFilament
Created by danzzz on 5/29/2024 in #❓┊help
Validate multiple dynamic fields
No description
7 replies
FFilament
Created by danzzz on 4/10/2024 in #❓┊help
Exporter: Modify Query based on Options?
Can I modify my exporter query based on additional options I have added to the form, next to the columns selection? In my case I have a Resource with transactional data. Each row has a column for an account, for example bank account or paypal account. I want to give the user the option if he wants to export the data off all accounts or just of certain accounts. I want to use getOptionsFormComponents() to add a multi select field where he can choose the accounts. But I have no idea how to use it in the query modifier used at the Action Button.
2 replies
FFilament
Created by danzzz on 2/8/2024 in #❓┊help
Use Spatie Translate language in Tables / Forms
I use spatie translate and can switch the language in my resources. I want to use the current language (not global language of laravel) in the table or forms. i mean the value of the language switcher. is that possible?
4 replies
FFilament
Created by danzzz on 1/18/2024 in #❓┊help
Reload InfoList after Update in RelationManger
On a ViewPage I use InfoLists to show data. Below the InfoList I display a RelationManger. If I edit data via the RelationManger the data in the InfoList dont update. How can I solve this?
6 replies
FFilament
Created by danzzz on 12/20/2023 in #❓┊help
renderHook scope dont work
dont't work, shows nowhere, should show on the table in the TransactionResource ->renderHook( 'tables::toolbar.search.before', fn (): View => view('filament.teste'), scopes: TransactionResource::class ) works on all tables: ->renderHook( 'tables::toolbar.search.before', fn (): View => view('filament.teste') ) anything wrong here with first snippet?
5 replies
FFilament
Created by danzzz on 12/19/2023 in #❓┊help
Editing Spatie Tags
I am trying to edit spatie tags:
Forms\Components\TextInput::make('name') ->afterStateHydrated(function (Forms\Components\TextInput $component, \Spatie\Tags\Tag $tag, Forms\Components\Livewire $livewire) { $component->state($tag->getTranslation('name', $livewire->activeLocale)); })
This fails: App\Filament\Resources\TagResource::App\Filament\Resources\{closure}(): Argument #3 ($livewire) must be of type Filament\Forms\Components\Livewire, App\Filament\Resources\TagResource\Pages\ManageTags given, called in /Users/xxx/xxx/xxx/xxx/vendor/filament/support/src/Concerns/EvaluatesClosures.php on line 35
2 replies
FFilament
Created by danzzz on 12/16/2023 in #❓┊help
Display an image (ImageColumn) from local storage (not public accessible)
hey all. I store some images on the local disk which is not accessible by the webserver, its just a file storage. Is it possible to show the images with ImageColumn in a table? Should I make a custom column and use laravel intevention plugin?
3 replies
FFilament
Created by danzzz on 12/14/2023 in #❓┊help
Pseude Toggle for activating an other field
I want to use a Toggle Field. The field has no represantation in the database. I just want to use it to activate (show/hide) an other field. The other field I activate/hide with this: ->hidden(fn (Forms\Get $get): bool => ! $get('with_uploads')) This works. But I cant manage it to set the toggles state on form load to the right value, it is always off. Forms\Components\Toggle::make('with_uploads') ->default(true) ->live(), Even when I try to use ->state() with a Function I get the error: Typed property Filament\Forms\Components\Component::$container must not be accessed before initialization Any suggestions?
3 replies
FFilament
Created by danzzz on 12/13/2023 in #❓┊help
FileUpload And Morph
I have an UploadResource which stores Uploads and some other data. In the Model it I have a method "uploadable" and I use "MorphTo". In my User Model I have "MorphMany" uploads. This works fine with a RelationManger. But now I want to use it also for other Resources which also should have Uploads but dont want to use RelationManger, just an FileUploadField. Any ideas?
8 replies
FFilament
Created by danzzz on 12/11/2023 in #❓┊help
Dynamic view when using ViewEntry possible?
In an infolist I want to load a view based on "transaction->account->type". My current working solution ist this: return $infolist ->schema([ ViewEntry::make('paypal') ->visible(function (Transaction $transaction) { return $transaction->account->type == 'paypal'; }) ->view('filament.infolists.transaction.paypal'), ViewEntry::make('bank') ->visible(function (Transaction $transaction) { return $transaction->account->type == 'bank'; }) ->view('filament.infolists.transaction.bank'), ViewEntry::make('cash') ->visible(function (Transaction $transaction) { return $transaction->account->type == 'cash'; }) ->view('filament.infolists.transaction.cash') ]); is there a better way? an other alternative may is to load the final view (paypal, bank or cash) in a base view ...
1 replies
FFilament
Created by danzzz on 12/8/2023 in #❓┊help
Show/Hide Table Columns based on getTabs()
I'm using the getTabs() method to filter records. I wan't to show/hide columns in my Table, based on which tab the user clicked. How can I do this?
6 replies
FFilament
Created by danzzz on 12/7/2023 in #❓┊help
Search also in hidden or not used columns
How can I include a column which I dont use in a table also in the table serach? I tried to hidde the column, but then it will be ignored when searching.
7 replies
FFilament
Created by danzzz on 11/25/2023 in #❓┊help
Disable Resource Title
How can I disable or hide a Resources Page Title? On a Page I just do this: public function getTitle(): string | Htmlable { return false; } But this don't work for my Resource Pages.
7 replies
FFilament
Created by danzzz on 11/8/2023 in #❓┊help
How to conditionaly use headerActions for tables?
I have my table configured seperately in an own class, so that I can use it on the main resource and in the manager. Is there a way to use table functions like headerAction or filters conditionaly? And how can I show/hidde a field/column based on where a table or form is used (main resource or manager) ?
3 replies