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

What is the purpose of the config file? #29

Closed
eberkund opened this issue Jun 29, 2016 · 3 comments
Closed

What is the purpose of the config file? #29

eberkund opened this issue Jun 29, 2016 · 3 comments

Comments

@eberkund
Copy link

eberkund commented Jun 29, 2016

In the documentation it says I can set a site wide default tenant column but the app/landlord.php file doesn't seem to do anything.

'default_tenant_columns' => ['tenant_id'],

I still have to specify the $tenantColumn in my middleware or anywhere else I want to use it.

public function handle($request, Closure $next)
{
    $tenantColumn = 'tenant_id';
    $tenantId = '1';

    Landlord::addTenant($tenantColumn, $tenantId);

    return $next($request);
}
@nunomazer
Copy link

The queries builded to select only the tenant records use this config

@eberkund
Copy link
Author

eberkund commented Jul 5, 2016

Could you give an example?

@hipsterjazzbo
Copy link
Owner

Yeah I can see that'd be confusing. It's used when building the queries that actually do the scoping.

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

3 participants