sven
sven
FFilament
Created by sven on 7/22/2024 in #❓┊help
Only allow to edit one record in my resource
The alternative is to redirect the list-action ^^'
class ListProfiles extends ListRecords
{
protected static string $resource = ProfileResource::class;

public function mount(): void
{
$this->redirectRoute('filament.admin.resources.profiles.edit', [ 'record' => auth()->user()->profile->id]);
}
class ListProfiles extends ListRecords
{
protected static string $resource = ProfileResource::class;

public function mount(): void
{
$this->redirectRoute('filament.admin.resources.profiles.edit', [ 'record' => auth()->user()->profile->id]);
}
Is creating a custom page for this the common approach?
5 replies
FFilament
Created by sven on 7/22/2024 in #❓┊help
Only allow to edit one record in my resource
I was hoping to profit from some of the work that EditRecord is already doing for me. But maybe I am overestimating what it does? - Adds the form - Handles save-confirmation - Rollbacks in case of exceptions Does that sound right?
5 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Keyboard Shortcuts for Wizard
I saw that there is a keybinding-option for actions. That would be a great API for wizards too. If there is no way already, I'll draft a PR for that
3 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Autocomplete with custom values?
I guess I will just give it a shot and draft a PR on the weekend
11 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Autocomplete with custom values?
Yup. That would be a worthwile PR / Feature-Request maybe
11 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Autocomplete with custom values?
ah, true! That could also be a way. Then I'd still need to cast that array to a string though. The reason I was asking in the first place was, that I felt I am just blind as this looked like a common requirement, but maybe this is worth writing a plugin
11 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Autocomplete with custom values?
Select::make($name)
->searchable()
->getSearchResultsUsing(
fn(string $search): array => collect(
self::myFancySearch($search)
)
->concat([$search])
->toArray()
)
Select::make($name)
->searchable()
->getSearchResultsUsing(
fn(string $search): array => collect(
self::myFancySearch($search)
)
->concat([$search])
->toArray()
)
The other 'solution' I found is adding the searchterm to the searchResults ^^'' but that seems super hacky
11 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Autocomplete with custom values?
Or something that behaves like Select but also allows custom inputs.. I think selects UX is a bit nicer, but both works (:
11 replies
FFilament
Created by sven on 5/16/2024 in #❓┊help
Autocomplete with custom values?
Exactly
11 replies
FFilament
Created by sven on 4/11/2024 in #❓┊help
How are Plugin Activations counted?
Thanks for your feedback (: You can now add one more happy customer to your list :D
5 replies
FFilament
Created by sven on 3/15/2024 in #❓┊help
Can I use the tenant switcher without tenants?
You mean to rebuild the tenant-UI myself? In the meantime I found I can set Resource::scopeToTenant(false); and that works fine for using the app and showing the switcher. Then the only missing piece would be to fire a custom hook after clicking on a tenant
4 replies
FFilament
Created by sven on 2/13/2024 in #❓┊help
Specify 'id' col for editpage
Found it! (I always see it after submitting the question xD sorry guys)
public static function getRecordRouteKeyName(): ?string
{
return 'foos.id';
}
public static function getRecordRouteKeyName(): ?string
{
return 'foos.id';
}
4 replies
FFilament
Created by sven on 1/30/2024 in #❓┊help
Option to place introductionary help text on top of ressources?
I have customers with access to the panel and I need, from time to time explain to them what ressources are for and who they might contact in case they need help or stuff
11 replies
FFilament
Created by sven on 1/30/2024 in #❓┊help
Option to place introductionary help text on top of ressources?
No description
11 replies
FFilament
Created by sven on 1/30/2024 in #❓┊help
Option to place introductionary help text on top of ressources?
Thanks @toeknee ! I ended up doing it like this:
public function mount(): void
{
FilamentView::registerRenderHook(
'panels::page.header-widgets.after',
fn(): View => view('filament.pages.provider.stripe-account-header'),
);

parent::mount();
}
public function mount(): void
{
FilamentView::registerRenderHook(
'panels::page.header-widgets.after',
fn(): View => view('filament.pages.provider.stripe-account-header'),
);

parent::mount();
}
Still seems a bit special for something I would expect many are doing on their own. The standard way for feature-requests is github communities, right?
11 replies
FFilament
Created by sven on 1/28/2024 in #❓┊help
Authorize Resouces not via model policies
Just found that canAccess is also available to ressources and not only Pages. That does the trick for me (:
3 replies
FFilament
Created by sven on 12/11/2023 in #❓┊help
MorphMany Relations not (yet) supported in V3 relationshipManager?
Oops. I'm stupid. It was my own typehint :x
3 replies