Call to undefined function getUser() after deploy on heroku serve helpers function not working on heroku server after deploy
Did you do a dumpautoload?
Did you check letter case?
Helpers verses helpers is case sensitive on linux.
Yes Bro... did this
i'm using window OS
i have registered helpers.php in composer.json
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
},
"files": [
"app/Helpers/helpers.php"
]
},
Have you tried using the browser developer tools to see what's going on with response and request.
And I am guessing from the question it works in local development, but not in production.
Perhaps show the method.
@spiral You have the helper defined under autoload-dev, so of course it won't work on production.
@jlrdw getting internal server error 500 in the devtool
sheltered-refuge-25738.herokuapp.com/:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
Thanks @talinon brother when used
"autoload-dev": {
"psr-4": {
"Tests\": "tests/"
},
"files": [
"app/Helpers/helpers.php"
]
},
to
"autoload": {
"psr-4": {
"App\": "app/"
},
"classmap": [
"database/seeds",
"database/factories"
],
"files": [
"app/Helpers/helpers.php"
]
},
then working find thanks again bro
@spiral glad you got it, that was a good catch on the autoload-dev.
Please sign in or create an account to participate in this conversation.