Dynamic Columns Based on User Selection (Laravel)

Viewed 828

i have a question, what i want to achieve is something like this: I'm using Laravel in my project, but i want to let every user customize his own tables views (show or hide columns) For example, in the next image i have three columns:

[First Header]

fh

But i want to let the user pick (show or hide) the columns he wants,

[Extra Columns]

ec

How do i achieve something like that? I am using Laravel and Jquery Datatables for the tables views.

I was thinking of create a table in the database which can store the columns (in a json) for every user and each module. I'd like to know if there is a better approach.

Thanks in advance, blessings!

1 Answers
Related