Theodoros
Theodoros
FFilament
Created by Theodoros on 2/11/2024 in #❓┊help
Actions in infolist
Hello, how can I add an action/button in an view page that contains infolist? I can do suffixactions but I need some button/actions at the end of the view page.
9 replies
FFilament
Created by Theodoros on 2/11/2024 in #❓┊help
How to ignore a form field from storing in DB
Hello, I have a form where I need 1 field for a specific action during form creation but it will not be stored in this specific table. How can I instruct Filament to ignore this field from stored in DB. Now I get an error that this column cannot be found in DB. Thanks
4 replies
FFilament
Created by Theodoros on 2/8/2024 in #❓┊help
How to hide a headeraction in a realtionmanager table
I want to hide a header action in a relation manager table based on existence even 1 record. If I have a record I don't want to see create new record. How can I make it?
1 replies
FFilament
Created by Theodoros on 1/10/2024 in #❓┊help
Using API call for multiple columns in a table
Hello, I execute an API call to an external endpoint that I will use to fill multiple columns in 1 table. How can I do it without executing multiple calls for every column but do it once and using ->state() to put it in several columns in the table?
3 replies
FFilament
Created by Theodoros on 1/10/2024 in #❓┊help
Table Column not field in DB
Hello, How can I have a column in a table that is not a field in DB but it will be filled using an API request to an external service. Thank!
7 replies
FFilament
Created by Theodoros on 12/29/2023 in #❓┊help
mutateFormDataBeforeCreate question
I want to send an API request before I store data in my DB so I use mutateFormDataBeforeCreate in my relevant Create Record page. Is it the most suitable way to interrupt the saving process ? I noticed that
protected function mutateFormDataBeforeCreate(array $data): array
{
dd($data);
return $data;
}
protected function mutateFormDataBeforeCreate(array $data): array
{
dd($data);
return $data;
}
Select::make('sshKeys')
->multiple()
->relationship('sshKeys', 'name')
->required()
->preload()
->label('SSH Key'),
Select::make('sshKeys')
->multiple()
->relationship('sshKeys', 'name')
->required()
->preload()
->label('SSH Key'),
When I try to get the data I cannot see the multi select data that are in a many to many relationship. Do you know why? Thanks!
8 replies
FFilament
Created by Theodoros on 12/19/2023 in #❓┊help
Select many to many problem
Hello! I have the following error in a Select field with many to many relationship. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sshKeys' in 'field list' The form contains:
Select::make('sshKeys')
->multiple()
->relationship('sshKeys', 'name')
->required()
->label('SSH Key'),
Select::make('sshKeys')
->multiple()
->relationship('sshKeys', 'name')
->required()
->label('SSH Key'),
This is the relationship in the model
public function sshKeys()
{
return $this->belongsToMany(SshKey::class, 'server_ssh_key');
}
public function sshKeys()
{
return $this->belongsToMany(SshKey::class, 'server_ssh_key');
}
The select field is filled successfully but when I try to save it I get the following error. SQLSTATE[42S22]: Column not found: 1054 Unknown column 'sshKeys' in 'field list' If I do my Select as multiple then everything is working properly. Any suggestion for the error?
6 replies