/**
  * Apply the scope to a given Eloquent query builder.
  *
  * @param  \Illuminate\Database\Eloquent\Builder $builder
  * @param  \Illuminate\Database\Eloquent\Model $model
  * @return void
  */
 public function apply(EloquentBuilder $builder, Eloquent $model)
 {
     $this->table = $model->getTable();
     $this->locale = $model->getLocale();
     $this->i18nTable = $model->getI18nTable();
     $this->fallback = $model->getFallbackLocale();
     $this->createJoin($builder, $model);
     $this->createWhere($builder, $model);
     $this->createSelect($builder, $model);
 }