Kane G
Kane G
FFilament
Created by pgferro on 9/17/2024 in #❓┊help
Persistent search selections on table
You should be able to follow either of these examples below. You can persist in the URL: https://filamentphp.com/docs/3.x/tables/columns/getting-started#searching-individually (example at bottom of this section) Or persist in session: https://filamentphp.com/docs/3.x/tables/columns/getting-started#persist-search-in-session
4 replies
FFilament
Created by Asmit Nepali on 10/24/2024 in #❓┊help
Share form problem.
You do have a spelling mistake "prodcut" should be "product" not sure if that will help or not.
->relationship('prodcut', 'name')
->relationship('prodcut', 'name')
8 replies
FFilament
Created by Nuekrato on 8/13/2024 in #❓┊help
canAccess() is called on every page/resource AFTER logout resulting in an exception?
The problem is strange in that the nav runs first before the redirect but that could be for a number of reasons. Realistically you should be making sure your functions return the correct type anyway. That function you posted above, has the possibility to return null but specifying only a bool can be returned.
public static function canAccess(): bool
{
return auth()->user()?->isAdmin() ?? false;
}
public static function canAccess(): bool
{
return auth()->user()?->isAdmin() ?? false;
}
Would be a better way to check and ensure when auth()->user() is null it will return false.
4 replies
FFilament
Created by Mook on 10/22/2024 in #❓┊help
Bulk actions which is only visible when 2 rows are selected
Have you tried just accessing the collection?
->visible(fn (Collection $selectedRecords) => $selectedRecords->count() == 2)
->visible(fn (Collection $selectedRecords) => $selectedRecords->count() == 2)
12 replies
FFilament
Created by BKF Dev on 9/29/2024 in #❓┊help
hasCombinedRelationManagerTabsWithContent bug
@BKF Dev Yeah Im running the same version and it's working for me. Laravel: v11.25.0 Livewire: v3.5.6
11 replies
FFilament
Created by Kane G on 9/30/2024 in #❓┊help
Action $arguments returning empty in visible closure
Now that I typed that out, I'm thinking it might be a better idea to create a component to display a single subscription component, and pass the name to that and have all the actions inside that.
5 replies
FFilament
Created by Kane G on 9/30/2024 in #❓┊help
Action $arguments returning empty in visible closure
I have a custom page that is used to manage subscriptions. On this page I have 3 tabs (my subscription, subscription management and payment methods) On subscription management, it displays the 3 subscriptions to pick from - these are generated from the DB so I loop over those results to display the subscriptions, with features, price etc. My goal here is to display a subscribe button (when no active subscription is present) and a switch subscription button (when there is an active one). To process the the correct subscription, I pass the subscription name through the arguments on the action. On the switch subscription button I only want to show available subscriptions so I want to hide the active switch subscription action only. Something like this:
->visible(fn(array $arguments) => $this->activeSubscription->name != $arguments['name'])
->visible(fn(array $arguments) => $this->activeSubscription->name != $arguments['name'])
I have a workaround atm (provided from the bug report I sent through). Setting the action to a variable first and then calling that variable actually solves the issue. eg. I change this:
@if($this->switchSubscriptionAction->isVisible())
{{ ($this->switchSubscriptionAction)(['name' => $subscription['name']]) }}
@endif
@if($this->switchSubscriptionAction->isVisible())
{{ ($this->switchSubscriptionAction)(['name' => $subscription['name']]) }}
@endif
To this:
@php
$switchSubscriptionAction = ($this->switchSubscriptionAction)(['name' => $subscription['name']]);
@endphp
@if($switchSubscriptionAction->isVisible())
{{ $switchSubscriptionAction }}
@endif
@php
$switchSubscriptionAction = ($this->switchSubscriptionAction)(['name' => $subscription['name']]);
@endphp
@if($switchSubscriptionAction->isVisible())
{{ $switchSubscriptionAction }}
@endif
I'm quite new to filament so not sure if this is the best approach.
5 replies
FFilament
Created by BKF Dev on 9/29/2024 in #❓┊help
hasCombinedRelationManagerTabsWithContent bug
I'm using it fine on multiple resources.
11 replies
FFilament
Created by Matte on 3/26/2024 in #❓┊help
Typed static property error when trying to activate cluster functionality
Ok I fixed my issue by updating my config/livewire.php settings. Making sure render_on_redirect is set to false will fix the Typed static property Filament\Pages\BasePage::$view must not be accessed before initialization issue.
5 replies
FFilament
Created by Matte on 3/26/2024 in #❓┊help
Typed static property error when trying to activate cluster functionality
Did you end up getting this sorted? I'm running into the same issue (where this was previously working fine)
5 replies
FFilament
Created by thedangler on 5/8/2024 in #❓┊help
After Login in, Dashboard design is all out of wack.
After reading your comments about making sure spa settings weren't activated, I ran back over my code. That actual issue here was using wire:navigate on my links from my guest pages. Removing that and allowing the pages to load naturally fixed my display issues.
16 replies
FFilament
Created by thedangler on 5/8/2024 in #❓┊help
After Login in, Dashboard design is all out of wack.
I'm running into this same issue moving between admin/user panel and laravel blade pages (outside of filament) . I have some guest pages built with Laravel / Livewire and the problem happens when including @livewireScripts within the guest layout. This is using the default laravel sail setup (locally)
16 replies