Publix is changing its dress code to allow workers to have beards after years of pressure from employees.

Companies including Walmart and Starbucks have made similar dress-code adjustments in recent years.

With low unemployment, companies are looking for new perks — such as revamped dress codes — to win over workers.

Publix — a grocery chain with a cult following — is finally changing its policy to allow employees to wear beards.

Last week, the company announced that it would change its rules, which allowed for mustaches but not beards, at its 1,196 locations across the United States, the Orlando Sentinel reported.

The change comes after significant pressure from employees. Three years ago, a Publix worker started a petition on Coworker.org to allow employees to grow beards. The petition, which gathered more than 18,000 signatures, led Publix to agree to review its dress code policy earlier this year.

The change makes Publix the latest in a number of retailers and restaurant chains to adjust dress-code policies to meet workers' demands. In 2016, Starbucks changed its dress code to allow workers to dye their hair and wear dark jeans. Earlier this year, Walmart announced that workers would be allowed to wear jeans and shirts of any color or pattern.

The changes come at a time when there is a "war for talent" in the retail and hospitality industries.

There were 757,000 retail-job openings across the US in July, which is about 100,000 more than a year ago, according to the Bureau of Labor Statistics. The influx of jobs is coming at a time when unemployment is low, at 3.9% in August.

As a result, retailers are scrambling to figure out how to win over workers. Retailers hiring seasonal workers have rolled out a series of new perks, including in-store discounts and paid time off. Many companies are also raising wages in an effort to attract talent.

Changing dress codes can be a relatively low-cost perk that can help attract and retain employees. With 18,000 people demanding Publix allow employees to have beards, changing the dress-code policy is a less expensive way to make workers happy than adding new benefits or increasing pay.