X7Ryan
X7Ryan
FFilament
Created by X7Ryan on 1/5/2024 in #❓┊help
Combining resources
That is interesting, not quite what I am looking for in my case. But I will make a note of it for if I ever need that.
4 replies
FFilament
Created by Jap on 1/5/2024 in #❓┊help
Create, Edit Page of a Resource to Modal
Jusr remove the create and edit pages from the resource then the create and edit actions will use modals instead. Like this:
public static function getPages(): array
{
return [
'index' => Pages\ListUsers::route('/'),
];
}
public static function getPages(): array
{
return [
'index' => Pages\ListUsers::route('/'),
];
}
4 replies
FFilament
Created by X7Ryan on 12/29/2023 in #❓┊help
Define Form Data Mutation in One Place?
Looks like I could just hook into the field's dehydration and modify it there. https://filamentphp.com/docs/3.x/forms/advanced#field-dehydration
3 replies
FFilament
Created by ItsTeegj on 11/30/2023 in #❓┊help
Can I have a route that can bypass multi-tenancy?
The only other workaround I could think of off the top of my head is to put it in a seperate panel without multitenancy.
6 replies
FFilament
Created by wotan6891 on 10/3/2023 in #❓┊help
I installed filament and I can't log in.
Are you using the FilamentUser contract on your User Model? https://filamentphp.com/docs/3.x/panels/users#authorizing-access-to-the-panel
59 replies
FFilament
Created by ded7978 on 9/1/2023 in #❓┊help
How i can get my own data or id of item in widgets.
A widget is essentially at it's core a Livewire component, which means you get access to Livewire features. So you can add a computed property. So if you want to access $this->data in the view just add this to the widget class:
#[Computed]
public function data(): string
{
return 'something';
}
#[Computed]
public function data(): string
{
return 'something';
}
Then {{ $this->data }} in the view will display "something".
4 replies
FFilament
Created by X7Ryan on 9/4/2023 in #❓┊help
Light/Dark mode switcher outside of Filament
Well like I said I have a Jetstream app that has filament for the admin section. The goal would be to have a light dark mode switch on the Jetstream app since it does not come with one. Rather than making a custom switch from scratch (the Filament one looks quite good). Bonus would be to maintain consistant state between Jetstream and Filament so admins keep their settings when switching between the Jetstream and Filament portions of the app.
3 replies
FFilament
Created by X7Ryan on 8/24/2023 in #❓┊help
Table combine multiple values into one column with multiple rows
Looks like searchable at least lets me pass a closure to customize the query
16 replies
FFilament
Created by X7Ryan on 8/24/2023 in #❓┊help
Table combine multiple values into one column with multiple rows
Yeah for the most part its fine except the second line of the address. I did notice that sorting and filtering is broken because you can only sort/filter on the contents of an actual DB column, not sure if there is an easy fix or if I just need to not have sorting/filtering
16 replies
FFilament
Created by X7Ryan on 8/24/2023 in #❓┊help
Table combine multiple values into one column with multiple rows
But thats good to know about the state method, Idk that I saw that in the docs
16 replies
FFilament
Created by X7Ryan on 8/24/2023 in #❓┊help
Table combine multiple values into one column with multiple rows
That is a bit much for a closure, because like line 2 might be null so that break tag need to be conditional and everything
16 replies
FFilament
Created by X7Ryan on 8/24/2023 in #❓┊help
Table combine multiple values into one column with multiple rows
Yeah I see your point.
16 replies
FFilament
Created by X7Ryan on 8/24/2023 in #❓┊help
Table combine multiple values into one column with multiple rows
State I think is perfect. IMO I feel like a view column is a bit much for a simple string with linebreaks and makes more sense if you want to so something more fancy like combing an avatar and username into a column or something.
16 replies
FFilament
Created by JohnnyC on 8/3/2023 in #❓┊help
Call auth()->user() from NavigationItems
15 replies
FFilament
Created by JohnnyC on 8/3/2023 in #❓┊help
Call auth()->user() from NavigationItems
That seems more reasonable, though not how it's documented here: https://filamentphp.com/docs/3.x/panels/navigation#conditionally-hiding-navigation-items so the question is, is it a bug with Filament that the docs version doesn't work or is it a mistake in the docs?
15 replies
FFilament
Created by JohnnyC on 8/3/2023 in #❓┊help
Call auth()->user() from NavigationItems
Interesting....sure enough that works but that can't be intended.
15 replies
FFilament
Created by JohnnyC on 8/3/2023 in #❓┊help
Call auth()->user() from NavigationItems
I recreated it in a bare filament v3 app here: https://github.com/x7ryan/filament-v3-auth-bug
15 replies
FFilament
Created by JohnnyC on 8/3/2023 in #❓┊help
Call auth()->user() from NavigationItems
@Geisi1909 in my case the only service provider listed after the panel service provider was the RouteServiceProvider. Since the panel was after the AuthServiceProvider that's not it. Still, just to make sure I did move the panel service provider to the very end and it still was null.
15 replies
FFilament
Created by JohnnyC on 8/3/2023 in #❓┊help
Call auth()->user() from NavigationItems
FWIW I'm experiencing this too. I am trying to use auth()->user() inside the visible method for a custom nav item and it's null.
15 replies
FFilament
Created by X7Ryan on 7/21/2023 in #❓┊help
[V3] Multitenancy - HasTenants Contract canAccessTenant() method
Idk I just went to check looks like it was closed without merging not sure why I'd have to see if they left a comment but kinda busy atm. 🤷‍♂️
6 replies