src/TranslatableScope.php
public function apply(EloquentBuilder $builder, Eloquent $model)
    {
        $this->table = $model->getTable();
        $this->locale = $model->getLocale();
        $this->i18nTable = $model->getI18nTable();
        $this->fallback = $model->getFallbackLocale();

        if(!starts_with($this->table, 'laravel_reserved_')) {
            $this->createJoin($builder, $model);
            $this->createWhere($builder, $model);
            $this->createSelect($builder, $model);
        }
    }
public function apply(EloquentBuilder $builder, Eloquent $model)
    {
        $this->table = $model->getTable();
        $this->locale = $model->getLocale();
        $this->i18nTable = $model->getI18nTable();
        $this->fallback = $model->getFallbackLocale();

        if(!starts_with($this->table, 'laravel_reserved_')) {
            $this->createJoin($builder, $model);
            $this->createWhere($builder, $model);
            $this->createSelect($builder, $model);
        }
    }
public function apply ( EloquentBuilder $ builder , Eloquent $ model ) { $ this -> table = $ model -> getTable ( ) ; $ this -> locale = $ model -> getLocale ( ) ; $ this -> i18nTable = $ model -> getI18nTable ( ) ; $ this -> fallback = $ model -> getFallbackLocale ( ) ; if ( ! starts_with ( $ this -> table , 'laravel_reserved_' ) ) { $ this -> createJoin ( $ builder , $ model ) ; $ this -> createWhere ( $ builder , $ model ) ; $ this -> createSelect ( $ builder , $ model ) ; } }
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 .