Global variable access problem

Hello
I am using laravel/quasar.
From the template it is possible to access the global variables, but I can’t do it from Page Custom JS?
I have tried to access it from the onBeforeMount event and I have not succeeded. I also can’t access the “this” object.
How could I solve this problem?
Thank
Regards