Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can we select certain records #122

Open
drxabdulrahman opened this issue Oct 14, 2024 · 2 comments
Open

Can we select certain records #122

drxabdulrahman opened this issue Oct 14, 2024 · 2 comments

Comments

@drxabdulrahman
Copy link

Hi Mr, many thanx for this great package.
can I apply a filter by certain field , example I want to show only records with certain type (according to type column in database) reported by date monthly . other types will not be shown

@drxabdulrahman
Copy link
Author

I found a solution which I cannot its good or non-profissional one.
I created another Model class in a subfolder - ex 'App/Models/Stats/User.php', and I put a global scope to this model and use it in chart

@Eruvaer74
Copy link

Another solution would be to create a database view with all the necessary data. Then you create a dummy model which references to this view. This is the model you're using for the charts.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants