Replies: 3 comments 14 replies
-
Thanks @arvinoids. Can you try grabbing any env variable using Leaf's |
Beta Was this translation helpful? Give feedback.
0 replies
-
Hello @mychidarko ! This is my code: app()->get("/getvars", function () {
response()->json(["APP_NAME"=>_env("APP_NAME")]);
}); and this is what I got: {"APP_NAME":"LEAF_API"} ...which to say, it does work. |
Beta Was this translation helpful? Give feedback.
0 replies
-
That's quite weird then. I'll check the db module. Which version of Leaf Db do you have installed? |
Beta Was this translation helpful? Give feedback.
14 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hello,
This is probably a configuration issue on my server or something...
My code runs fine on the development machine (Windows, using
php leaf serve
). However, when I cloned the code to my Ubuntu apache server, I get the error"SQLSTATE[HY000] [1698] Access denied for user 'root'@'localhost'"
when autoConnect is executed. In the Environment & details section, I can see that the database information and credentials are all picked up from the.env
file correctly, but for some reason, autoConnect reverts to the'root'@'localhost'
credentials. Does anyone have an idea what is going on? p.s. the error only comes up when I invoke a route that calls a controller, regardless if the controller access a model or not (thus, accessing / does not throw this error).@mychidarko Great work on leaf API!
Thanks,
Arvin
Beta Was this translation helpful? Give feedback.
All reactions