Yii2: How to let ActiveRecord models only see certain database data?
问题 I'm trying to implement a multi-tenant application. I have different customers that are using the same code. But each customer gets its own entry script with its own configuration. The customer id is accessible by Yii::$app->params['customerId'] . Note: I have to distinguish the customers that way because there is no login/authentication. Anyway, assume the controller action is called and a customer id is given with the parameter. Now I have some tables and each has a column for the customer