The actress is completing a court-ordered 30-day stint in a private rehab facility

Heather Locklear has the support of her loved ones as she receives treatment in rehab.

A source close to the situation tells PEOPLE that the actress, who is completing a court-ordered 30-day stint in a private rehab facility, has maintained a positive relationship with her 21-year-old daughter Ava, whom she shares with ex Richie Sambora.

“Ava has a very loving and supportive relationship with her mom,” the source says. “And as painful it is, she knows that it’s in her mom’s hands and God’s hands. All she can do is like anybody else, just pray and support.”

'Scary Movie 5' film premiere, Los Angeles, America - 11 Apr 2013
Credit: Matt Baron/BEI/REX/Shutterstock

Locklear, 57, has battled substance abuse for years and has sought help in rehab a number of times. Last month, the Melrose Place actress pleaded no contest to eight misdemeanor counts stemming from her two arrests in 2018, PEOPLE confirmed: five counts of battery on a peace officer, one count of battery on an emergency medical personnel, and two counts of resisting, obstructing, or delaying a peace officer.

The first arrest, in February, was on suspicion of felony domestic battery over an incident with her boyfriend and three counts of battery on a police officer after she allegedly threatened deputies. The second, in June, came after Locklear allegedly attacked the police officer and EMT who responded to a disturbance call at her residence. Police told PEOPLE that the actress was “extremely intoxicated” and “arguing with friends and family” when they arrived.

TMZ first reported that Locklear was ordered to enroll in a month-long treatment program in a residential mental health facility by Sept. 6.

Radar Online reported that Locklear was sentenced to 120 days in jail, but the sentence was stayed pending the completion of the treatment program. She was also reportedly placed on an informal three-year probation; under the terms of her sentence, she cannot consume alcohol, possess dangerous or deadly weapons, or take non-prescription medication.

A legal representative for Locklear did not respond to PEOPLE’s request for comment at the time.

While Locklear was in court, Ava and Sambora were enjoying some quality time in Spain together.

“It just happened to be she was in Barcelona with her boyfriend and Richie, and they just had a wonderful time,” the source explained.

According to the source, Ava has been leaning heavily on her father and throwing herself into her schoolwork as a senior at Loyola Marymount University.

“She’s an incredible student,” the source says. “She stays close with her dad. He’s rock solid support, he always has been. It’s really their close relationship that has helped her through.”

“She and Richie do a lot of things together,” the source added. “It’s been a godsend for Ava’s strength and her maturity, and her faith. They’re all supportive and love Heather.”

Locklear herself has been acknowledging her sobriety on Instagram, and according to the source, “everyone is hoping for the best.”

“As long as she keeps her sobriety, that’s great,” the source says. “Ava loves and supports her. Her loved ones want for her to get better, whatever that takes.”