src/Eloquent/TenantableScope.php
/**
     * Apply the scope to a given Eloquent query builder.
     *
     * @param  \Illuminate\Database\Eloquent\Builder $builder
     * @param  \Illuminate\Database\Eloquent\Model   $model
     * @return void
     */
Apply the scope to a given Eloquent query builder.
Apply the scope to a given Eloquent query builder .
protected function handle(EloquentBuilder $builder, Model $model)
    {
        return $builder->whereHas(
            'tenant', function ($tenant) {
                $tenant->whereKey($this->tenant()->getKey());
            }
        );
    }
protected function handle ( EloquentBuilder $ builder , Model $ model ) { return $ builder -> whereHas ( 'tenant' , function ( $ tenant ) { $ tenant -> whereKey ( $ this -> tenant ( ) -> getKey ( ) ) ; } ) ; }
Apply the scope to a given Eloquent query builder.
Apply the scope to a given Eloquent query builder .