marco76tv
how to pass a variable to importer and use it inside getColumns
maybe a small change to importAction to pass by
ImportAction::make()
->importer(ContactImporter::class)
TO
ImportAction::make()
->importer(ContactImporter::make(['var1'=>'value1']))
17 replies
how to pass a variable to importer and use it inside getColumns
I created the ManageContacts subpage and added the action
ImportAction::make()
->importer(ContactImporter::class)
->options([
'survey_id'=>$this->record->getKey(),
])
each survey has translations of the field labels,
and I have to put getColumns inside
$survey_id=Str::of(url()->previous())
->between('/surveys/','/contacts')
->toString();
$survey=Survey::firstWhere(['id'=>$surveyid]);
$trans = $survey?->getTrans() ?? []; -------------------------------------------------------- $k='attribute'.$i; $columns[]=ImportColumn::make($k) ->label($trans[$k] ?? $k) ->ignoreBlankState();
$trans = $survey?->getTrans() ?? []; -------------------------------------------------------- $k='attribute'.$i; $columns[]=ImportColumn::make($k) ->label($trans[$k] ?? $k) ->ignoreBlankState();
17 replies
nested resource
also in original
https://github.com/Sevendays-Digital/filament-nested-resources/blob/main/src/ResourcePages/NestedPage.php
27 replies
nested resource
there are many ..
on the file
https://github.com/laraxot/filament-nested-resources/blob/master/src/NestedResource.php
Route::current() became null .. so i try to use Session .. but there has to be a better solution
27 replies