BOT_Larry
BOT_Larry
FFilament
Created by BOT_Larry on 9/11/2024 in #❓┊help
Filament behind a reverse proxy, wrong redirections
Hello, i have my filament installation behind a reverse proxy. If i hit the server URL (sub.domain.de) i'm getting redirected to 12.34.56.78/login (local ip in my network) . (Theoreticly correct, but only localy) If i hit sub.domain.de/login manualy i can login. but this is very anoing. How can i specify the domain that the generatet links are correct? APP_URL in env is already set correct. Thanks for the help!
2 replies
FFilament
Created by BOT_Larry on 2/21/2024 in #❓┊help
Use Action inside a custom field
Hello, i have a error in my custom field, because i have 2 form submit buttons. Field:
class ObjectPaymentFunction extends Field
{
protected string $view = 'forms.components.custom-field';
}
class ObjectPaymentFunction extends Field
{
protected string $view = 'forms.components.custom-field';
}
forms.components.custom-field.blade.php:
<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div>
{{ $this->billCreatedAction() }}
<x-filament-actions::modals />
</div>
</x-dynamic-component>
<x-dynamic-component
:component="$getFieldWrapperView()"
:field="$field"
>
<div>
{{ $this->billCreatedAction() }}
<x-filament-actions::modals />
</div>
</x-dynamic-component>
EditCustomer:
class EditCustomer extends EditRecord
{
public function billCreatedAction(): Action
{
return Action::make('billCreated')
->label('Close')
->requiresConfirmation()
->action(function () {
dd('billAction');
});
}
}
class EditCustomer extends EditRecord
{
public function billCreatedAction(): Action
{
return Action::make('billCreated')
->label('Close')
->requiresConfirmation()
->action(function () {
dd('billAction');
});
}
}
The error: The action is shown correctly, also the modal is asking for confirmation. But on confimation the save Button in the backgound on the create page is triggered. And the record is saved. But the modal is still open. Is there a way to separate the "confimation form" on the edit page?
58 replies
FFilament
Created by BOT_Larry on 2/15/2024 in #❓┊help
Manual filter after query in table
Is it possible to perform a manual query after loading the models from the db? Something like this:
foreach ($table->getAllRecords() as $record) {
if ($record->customFunctionOrFilter()){
unset($record);
}
}

return $table
->columns([...])
foreach ($table->getAllRecords() as $record) {
if ($record->customFunctionOrFilter()){
unset($record);
}
}

return $table
->columns([...])
I know this hasn't the best performance.
2 replies
FFilament
Created by BOT_Larry on 2/9/2024 in #❓┊help
open Record URL from $table in new tab
Hello, i have a custom URL on a documents table
return $table
->recordUrl(fn ($record): string => $record->getUrl())
return $table
->recordUrl(fn ($record): string => $record->getUrl())
What is the right way to open the URL in a new tab? In the table index.blade is the
\Filament\Support\generate_href_html($recordUrl)
\Filament\Support\generate_href_html($recordUrl)
called, buth without parameters. Is it possible to implement this or maybe overrite the generate_href_html for now?
7 replies
FFilament
Created by BOT_Larry on 2/8/2024 in #❓┊help
Livewire component in form
Hello, don't know if its the right way to do but: in a form i have a custom "form component" for a "custom file element". On this element i want to use wire:click, but always get:
Unable to call component method. Public method [test] not found on component
Unable to call component method. Public method [test] not found on component
Is it not possible to use livewire on components this way? Is there a way to solve this?
5 replies