Under Laravel (and even plain php) specifically for your goals and never will be ready libraries.
Can request code from a freelancer, but it will clearly not cost 100 rubles.
Kyleigh_Hills answered on July 2nd 19 at 18:17
Matrix you need to do: users ID, group IDs is a General summary matrix.
Then, make the sample according to the matrix of the desired users or groups for a given selection criterion is a matrix of criteria (the groups, age, etc.).
Further, we can compare the quantitative percentage of the audience of this criterion on the General background through the banal formula of interest calculation.
Also, you can compare 2 or more different selection criteria among themselves.
Shan answered on July 2nd 19 at 18:19
Last winter tried to determine the interests of users of different communities. Done through the api vk. A very long time to work out. A few hours in community with 1000 people. All because of limitations on the number of requests per second.