Skip to content

Passing data from controller / showing a dynamic subset? #1626

Answered by lrljoe
mallanza asked this question in Q&A
Discussion options

You must be logged in to vote

This is quite a complex question that you've asked here to be honest, as you're basically asking for a solution to role-based access control GUI.

Taking it a step at a time, you have a "Roles" table.

I'm assuming presence of Eloquent relations, so you can use the relationship to the "Users" to get a "count" back, and are doing that?

You can then add a label/view/button Column, and use that to open a Modal, passing relevant parameters (for example, the "role id".

When it comes to then opening the "Users" table, there are various options, and you can expose different properties, and use them on mount, you can then use these in the builder() as you need (to constrain the relation for example).

Replies: 1 comment 1 reply

Comment options

lrljoe
Jan 5, 2024
Collaborator Sponsor

You must be logged in to vote
1 reply
@mallanza
Comment options

Answer selected by mallanza
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants