function scopeSlugIs($q, $v) { if (!$v) { return $q; } else { return $q->where(Static::getSlugField(), 'like', $v); } }