Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

shami003's avatar

Open edit modal on the basis of parameter in URL

I want to open edit modal in FriendsRelationshipManager on the User If URL has parameter openEditModal=7 it should open edit modal of a Friend with id 7

I used mount() but it didn't worked, afterMount() is not even showing the logs

My current implementation

public $openEditModal = null;

public function afterMount(): void
{
    if ($friendId = request()->query('openEditModal')) {
         $this->dispatch('modal.edit-friend-' . $friendId);
    }
}
0 likes
0 replies

Please or to participate in this conversation.