I have club table and user table. club hasMany user and I was using partial to show the user table in club Forms. I created toolbarPartial: user_toolbar and added export button in toolbar. I can export the user data but only all user data. How can I filter the user by club? Thank you.
To control the export data, you can define an export model to apply constraints to the query used for collecting data. Here is a link to the relevant documentation article:
I hope this helps!
Thanks for your help.
I created the UserExportModel and public function exportData, it can constraints to the query in where club_id = 1 in hardcoded but cannot get club_id to UserExportModel.
How can I get club_id in club to UserExportModel or through toolbar export button get club_id?
You could access it using the
1-4 of 4