It is not allowed, it is not allowed to plant, but what happened was this.
The Prophet ﷺ passed by two graves.
He said, "They are being punished, and they are not being punished for something major. As for one of them, he used to spread gossip, and as for the other, he did not protect himself from urine or from his own urine."
Then he took a fresh branch and split it in two.
A palm branch, which is the frond, and he split it in two.
He placed half on one grave and half on the other, and said, "Perhaps Allah will forgive them as long as these do not dry out, or lighten the punishment for them, excuse me, as long as they do not dry out."
That means the period during which there is still life in it.
Washing, fine, that it may lighten their punishment, because they are Muslims. So this is from the du'a of the Prophet for them. Some scholars.
said: This is permissible. Since the Prophet did it, then we do it. There is nothing wrong with placing.
That means a palm branch or something like that, on the basis that it might lighten the punishment for the deceased.
And some scholars said: First, this is specific to the Prophet ﷺ. Then the Prophet informed us that they were being punished. You realize that this grave is being punished and not blessed; you do not know the unseen.
Third, they said that the Prophet ﷺ.
He did not do this with anyone else, despite the many who died, and he did not command it.
His Companions, so most said this was specific to the Prophet ﷺ, and some scholars allowed it, but not planting.