NolanN
NolanN
FFilament
Created by NolanN on 1/14/2025 in #❓┊help
Building a complex countdown table column
I'm trying to build a countdown into a table column. I'm currently using ViewColumn to do this with some alpine code to handle updating the remaining time. The table is displaying records from a ReverseAuction table. The ReverseAuction model has an attribute to calculate what time that auction will end because users in the system can take actions which would change the end time. I call this attribute true_ends_at. I have the table polling every 10 seconds to check for updates made by other users. If I output the true_ends_at timestamp in a table column, I see that this is correctly updating when other users affect the ending time. The problem is that the countdown column will not adjust to the correct time. The countdown just continues from whatever the state of the column was when the page was first loaded.
29 replies
FFilament
Created by NolanN on 1/10/2025 in #❓┊help
Show alternate logo when sidebar is collapsed
As far as I can tell, this isn't possible. It looks like the logo is hidden by alpine if the sidebar is collapsed. I'd love to have the option to specify a logo for use in this case with something like ->iconLogo() on the panel. Is this possible or does anyone know if someone is building this kind of functionality?
12 replies
FFilament
Created by NolanN on 11/8/2024 in #❓┊help
Default option for select filter
I'm trying to set the default option in a select filter but it doesn't seem to apply.
SelectFilter::make('lead_type_profile_id')
->label('Lead Types')
->options(Filament::getTenant()->tenant->leadTypeProfiles->pluck('name', 'id'))
->default(Filament::getTenant()->tenant->leadTypeProfiles()->base()->first()->id)
->query(fn (Builder $query) => $query)
->multiple()
->preload(),
SelectFilter::make('lead_type_profile_id')
->label('Lead Types')
->options(Filament::getTenant()->tenant->leadTypeProfiles->pluck('name', 'id'))
->default(Filament::getTenant()->tenant->leadTypeProfiles()->base()->first()->id)
->query(fn (Builder $query) => $query)
->multiple()
->preload(),
Using only default() also fails to set a default selection. And I don't want to use selectablePlaceholder(false) because I do have a case where all options need to be shown in the table.
4 replies
FFilament
Created by NolanN on 7/8/2024 in #❓┊help
Error notifications on create pages
How can I show a simple error notification when creating a resources fails? I see there is a getCreatedNotification but I don't see an equivalent for an error state.
19 replies
FFilament
Created by NolanN on 6/3/2024 in #❓┊help
JS Select is showing "arrowdown" in the search field
No description
4 replies
FFilament
Created by NolanN on 5/15/2024 in #❓┊help
Can I show records from 2 relationship in one relation manager?
I have a Source model that has fields and definition relationships. The definition relationship also has a fields relationship. The Source model can return a list of validation rules that are generated by get the fields from the definition and then overrides any rules that have a title that match a field related to the Source. What I want is to have a relation manager on the SourceResource that can show all the fields related to the definition in a disabled state and the fields related to the Source in an enabled state. Is this possible to in a relation manager? Do I need to create a custom page possibly?
5 replies
FFilament
Created by NolanN on 5/7/2024 in #❓┊help
Relating form tabs to specific model instances
Hey all, I've got a model to store integrations with other services. I'd like to use form tabs for each integration type that is available. Is there a way to essentially make each tab it's own form that is directly related to a model instance? I'm sure I could build this by modifying the data before creating an integration but I am curious if there is a built in way to do something like this.
4 replies
FFilament
Created by NolanN on 5/2/2024 in #❓┊help
Database notifications not showing in panel
I added database notifications to one of my panels and I see the icon and I get the slide over. I also configured a toDatabase method on the Laravel notification I had created. I see it getting stored in the DB and it is linked to the correct model but nothing is showing in the user interface. Any ideas?
12 replies
FFilament
Created by NolanN on 4/25/2024 in #❓┊help
Getting a 404 when trying to register a tenant
I'm trying to enable the tenant registration feature in one of my panels but I'm getting a 404 when I try to access the page: No query results for model [App\Models\Customer] new Here is the code from my panel:
public function panel(Panel $panel): Panel
{
return $panel->id('customer')
->tenant(Customer::class)
->tenantRegistration(RegisterCustomer::class)
...
}
public function panel(Panel $panel): Panel
{
return $panel->id('customer')
->tenant(Customer::class)
->tenantRegistration(RegisterCustomer::class)
...
}
The route is listed as expected: GET|HEAD app/new .................... filament.customer.tenant.registration › App\Filament\Customer\Pages\RegisterCustomer Any idea why there is a query being made for this customer model?
16 replies
FFilament
Created by NolanN on 4/3/2024 in #❓┊help
Branding a panel with tenant info
I was hoping to use a tenants name, logo, color, etc for the branding of a panel but the tenant hasn't been identified by that point. I was hoping that the new multi-tenant domain updates might make that possible but it doesn't appear so. Is there any way to do this currently?
9 replies
FFilament
Created by NolanN on 4/1/2024 in #❓┊help
How to customize sidebar collapse icon
No description
6 replies
FFilament
Created by NolanN on 3/20/2024 in #❓┊help
Display plain text token in modal after creation
I have a model which generates a Sanctum token after the model's created event fires. However, I want to show the plain text token to the user in a modal. Is there any way to do this currently?
8 replies
FFilament
Created by NolanN on 3/1/2024 in #❓┊help
Getting a 419 error when trying to download export
I wanted to give exporting a try so I ran the necessary migrations and created a very simple export. The export completed as expected but when I click the download link in the notification panel, I get a 419 error.
3 replies
FFilament
Created by NolanN on 3/1/2024 in #❓┊help
Add tenant scope only to child resource
I'm building a multi-tenant app which has a resource that does not need to be scoped to the tenant. However, on the table I want to list counts of a related resource that should be scoped to the tenant. Is there a way to have a parent without a scope and a child with the tenant scope?
6 replies
FFilament
Created by NolanN on 2/12/2024 in #❓┊help
Redirect to a url after action
I'm trying to create an action that will allow a user to create a new Stripe Connect account. In that workflow, an account is created first and then an account link is created and the user is redirected to complete their Stripe onboarding. I'm trying to do this utilizing the the action and url methods from the Action but I'm immediately redirected to the url when I click the button
8 replies
FFilament
Created by NolanN on 2/12/2024 in #❓┊help
Extra sessions being created when clicking an action button
I'm running into an issue where additional sessions are being creating when taking simple actions in my app. For example, I have a Source resource with a list page. I've added a simple action:
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Actions\Action::make('url')
->form([
TextInput::make('url')
->label('URL')
->placeholder('https://example.com')
->required()
->rules('url'),
]),
];
}
protected function getHeaderActions(): array
{
return [
Actions\CreateAction::make(),
Actions\Action::make('url')
->form([
TextInput::make('url')
->label('URL')
->placeholder('https://example.com')
->required()
->rules('url'),
]),
];
}
When I click on the action, there is a single call in the network tab and a new session is created in storage/framework/sessions. Without adding any text to the input, I click away and 2 more network calls are made, each producing another session. Clearly something is misconfigured with my setup. I am using stancl/tenancy for custom domain support and I'm using a panel on a subdomain in this example.
17 replies
FFilament
Created by NolanN on 1/10/2024 in #❓┊help
Triggering actions from a table column
No description
3 replies