Kaaiman
Kaaiman
FFilament
Created by Kaaiman on 11/19/2024 in #❓┊help
Is it possible to open a relationshipmanager in a modal from the list records view?
I want to open a relationshipmanager of a record in a modal from the list records view. Is this possible via a table action?
2 replies
FFilament
Created by Kaaiman on 11/7/2024 in #❓┊help
Issues when extending resource pages
I am running into issues when overriding pages from a resource. I configure the used resource in a config file from a filament plugin. The idea for the plugin is to have basic resources (for standard implementations). Where I can extends the resources for custom implementations if needed. I register the resource by using the following notation in the base resource pages:
public static function getResource(): string
{
return config('package-config.topic.resource');
}
public static function getResource(): string
{
return config('package-config.topic.resource');
}
I publish the config file in my project and edit the resource to be the CustomTopicResource. Example: Package/Plugin: TopicResource - EditTopic - CreateTopic - ListTopics - ManageUsers Laravel project: CustomTopicResource extending the TopicResource of the plugin. - EditTopic - EditTopicChecklist (which also has to declare the getResource method) Now if I visit the ManageUsers page, the EditTopicChecklist sub navigation item dissapears. Why is this? It is implementing the getResource method. I would have to extend the ManageUsers class to redeclare the static getResource method, which completely destroys the idea of having default implementation without needing to extend anything. Is there a solution for this or am I doing something wrong here?
2 replies
FFilament
Created by Kaaiman on 10/22/2024 in #❓┊help
SelectFilter default not working
I am trying to set a default value on my SelectFilter:
SelectFilter::make('status')
->multiple()
->options(RefundStatus::class)
->default(RefundStatus::Pending),
SelectFilter::make('status')
->multiple()
->options(RefundStatus::class)
->default(RefundStatus::Pending),
This is about the same as in the docs, instead the docs use a string value.
8 replies
FFilament
Created by Kaaiman on 10/18/2024 in #❓┊help
Dynamic default repeater fields
For an application I am making a custom field which in essence is a repeater, a model can have custom fields which are configured in the config file. I want to load these fields as default in a repeater, how would I do this dynamically? I see that there is needed a list instead of an associative array for the default value, this is just somehow not possible I think?
4 replies
FFilament
Created by Kaaiman on 9/6/2024 in #❓┊help
Empty tenant login
I would like to know if it is possible to still be able to login to a panel, even if there are no tenants available. Is this already available?
7 replies
FFilament
Created by Kaaiman on 8/23/2024 in #❓┊help
Different query results with Laravel Octane
I am trying to query results, but with Octane I get different results. Within an attach action I am trying to do the following query:
Forms\Components\Select::make('recordId')
->label('Product')
->live()
->options(
fn () => Product::query()
->whereNotIn('id', $this->ownerRecord->products()->pluck('id'))
->orWhereNull('project_id')
->orWhere('project_id', $this->ownerRecord->project_id)
->pluck('name', 'id')
)
->afterStateUpdated(function ($state, Forms\Set $set) {
$set('price', Product::findOrFail($state)?->default_price); // @phpstan-ignore-line
$set('token_price', Product::findOrFail($state)?->default_price / $this->ownerRecord->project->token_price); // @phpstan-ignore-line
})
->searchable()
->preload()
->required(),
Forms\Components\Select::make('recordId')
->label('Product')
->live()
->options(
fn () => Product::query()
->whereNotIn('id', $this->ownerRecord->products()->pluck('id'))
->orWhereNull('project_id')
->orWhere('project_id', $this->ownerRecord->project_id)
->pluck('name', 'id')
)
->afterStateUpdated(function ($state, Forms\Set $set) {
$set('price', Product::findOrFail($state)?->default_price); // @phpstan-ignore-line
$set('token_price', Product::findOrFail($state)?->default_price / $this->ownerRecord->project->token_price); // @phpstan-ignore-line
})
->searchable()
->preload()
->required(),
When using Octane I get all results, but when not using octane the query is right. How can this be possible and what could I do about this? I am talking about the options query.
1 replies
FFilament
Created by Kaaiman on 8/16/2024 in #❓┊help
Laravel Octane and Filament
I am running into issues on production where resources are not the same when refreshing a couple of times. For example: I use the filament shield plugin where I can select permissions for users, sometimes no permissions would load and when i refresh a couple of times it would. Is this a common issue?
9 replies
FFilament
Created by Kaaiman on 6/26/2024 in #❓┊help
Doughnut chart lines
No description
8 replies
FFilament
Created by Kaaiman on 6/21/2024 in #❓┊help
Show attachaction on view page
Is it possible to show the attachaction in the header actions of a relationship on a view page?
5 replies
FFilament
Created by Kaaiman on 4/23/2024 in #❓┊help
Conditionally show Relationship (manager)
How would I be showing a relationship (manager) conditionally?
5 replies
FFilament
Created by Kaaiman on 4/16/2024 in #❓┊help
Dependency injection for CreateRecord page
Is it possible to use DI on CreateRecord pages? If so, where can I find how?
4 replies