I have created a file inside config folder similar like config.php. how can I call the global variables mentioned in my newconfigfile.php in my js file. for example define("DATETIME_FORMAT", "MM/dd/yy HH:mm");
Create a fie in your app/Vendor/newconfigfile.php then paste this line
define("DATETIME_FORMAT", "MM/dd/yy HH:mm");
Now go to in your app/Config/bootstrap.php
Add the following line
App::import('Vendor', 'newconfigfile');
Now you can call DATETIME_FORMAT
as a global variable.