n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm
n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
i'm marking it as solved, i have found a way using factories :cool_tofu:
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
Weirdly this does not work on the ImportAction
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
ExportAction::make('export_list')
->exporter(BaseExporter::class)
->beforeFormFilled(function ($record) {
/** @var ExportAction $exportAction */
$exportAction = $this->getMountedTableAction();
$exportAction->exporter($record->exporter_class);
})
->color('info')
->label(false)
->tooltip(__('admin.export'))
->icon('heroicon-o-arrow-down-tray')
->requiresConfirmation()
->modalHeading(__('admin.export'))
->modalIcon('heroicon-o-information-circle')
->modalDescription(__('admin.confirm_message')),
ExportAction::make('export_list')
->exporter(BaseExporter::class)
->beforeFormFilled(function ($record) {
/** @var ExportAction $exportAction */
$exportAction = $this->getMountedTableAction();
$exportAction->exporter($record->exporter_class);
})
->color('info')
->label(false)
->tooltip(__('admin.export'))
->icon('heroicon-o-arrow-down-tray')
->requiresConfirmation()
->modalHeading(__('admin.export'))
->modalIcon('heroicon-o-information-circle')
->modalDescription(__('admin.confirm_message')),
just for info, with this, the export button behave as i wanted โ˜ฎ๏ธ
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
Sorry for the late answer, For the first option, i don't think that will clean way to do this, i got around 15 exports to deal with. For the second option, on which object are you referring to? Well the digging continues ๐Ÿ˜… , i found this on the net, so yea i'm experimenting https://medium.com/@cameron_germein/things-i-wish-someone-had-explained-to-me-dependency-injection-in-laravel-filament-what-does-5dae3bbf8f23
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
Ok thx for help
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
public function actions(array | ActionGroup $actions, ActionsPosition | string | Closure | null $position = null): static for the 2nd argument it is allowed ๐Ÿคฆ๐Ÿปโ€โ™‚๏ธ
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
i got this error Filament\Tables\Table::actions(): Argument #1 ($actions) must be of type Filament\Tables\Actions\ActionGroup|array, Closure given, called in /var/www/html/app/Livewire/ListTables.php on line 109 it weird though, i have checked the function, closure is allowed
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
No description
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
AuthorExporter, i want to make this dynamic
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
->actions([ ExportAction::make('export_list') ->exporter(AuthorExporter::class) ->color('info') ->label(false) ->tooltip(('admin.export')) ->icon('heroicon-o-arrow-down-tray') ->requiresConfirmation() ->modalHeading(('admin.export')) ->modalIcon('heroicon-o-information-circle') ->modalDescription(__('admin.confirm_message')), ])
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
The export varies depending on the row configuration
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
No i have a table list of data with custom actions on each row
22 replies
FFilament
Created by n๐Ÿ…ฐ๐Ÿ…ณ๐Ÿ…ด๐Ÿ…ดm on 10/28/2024 in #โ“โ”Šhelp
ExportAction with dynamic exporter name based on the current row model value
I have built multiple exporters
22 replies