Store a javascript function on the server and consume it in the php application

Hello

for a few days I have tried to read functions in javascript generated on the server (mongodb), but I have not had success, in previous versions, I used execute on the php side to consume the functions, but this command for version 4.2 of mongoDB is obsolete , could someone support me with an example.

I thank you and excuse me for my English

Hi @Joel_Gonzalez, welcome to the community.

Could you elaborate with some examples what you mean by “execute on the php side”? Would be helpful if you include the command that was working pre-MongoDB 4.2 as well.

Best regards,
Kevin