Polyglot\Polyglot::scopeWithLang PHP Метод

scopeWithLang() публичный Метод

Localize a "with" method
public scopeWithLang ( ) : Query
Результат Query
    public function scopeWithLang()
    {
        $relations = func_get_args();
        $query = array_shift($relations);
        if (empty($relations)) {
            $relations = array(Lang::getLocale());
        }
        return $query->with($relations);
    }