Skip to content

How to make one view to display the activities of all tenants in single (possibly different) App. #369

Answered by bayangan
nelson8013 asked this question in Q&A
Discussion options

You must be logged in to vote

You only need to loop all the tenants with

Tenant::all()->eachCurrent(function(Tenant $tenant) { 
  //here $tenant is make current, so the switching db is already done
  //you can use query against db to mine data, for eg querying teachers table which exist in tenant db
});

Replies: 4 comments 3 replies

Comment options

You must be logged in to vote
2 replies
@nelson8013
Comment options

@nelson8013
Comment options

Comment options

You must be logged in to vote
0 replies
Answer selected by masterix21
Comment options

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

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants