How to show user specific data on a page in a new panel?
I created a new panel ('app'), and I want this panel to be accessible for non-admin users. The user should be able to manage their data and relationships in this panel, rather than all the data like in the admin panel. How can I configure what data is available on the app panel?
6 Replies
That's hiding navigation items. I mean user specific data.
Instead of all resource entries, just the one that belongs to the user.
Sorry I misunderstood your question. What about creating a custom resource where you modify its query based on the auth user?
I think that the closest thing for you is this:
https://filamentphp.com/docs/3.x/panels/tenancy
But even then, I'm not sure if it will fit all of your needs. So it's best to attempt and build the filters yourself
Thanks @Homd @.modestasv
I suppose I had the wrong idea of what Filament is for. It's probably better to use Breeze / Jetstream for the 'app' side of a project rather than trying to fit both the app and admin panel in Filament.
If you want only access 'app' to 'user' without 'admin-role' then you need to re-write the login page for app. and when generating some resource you mention which panel it should place, and according to that you can change the query (auth user can only see, add, edit his own data)