Service not working - showing undefined function service() |
I am tying to use service in Common.php like my other projects. But do not know why this is showing me the following error.
Quote:Fatal error: Uncaught Error: Call to undefined function service() in C:\Users\...\app\Common.php:19 Codes from Config/Services.php PHP Code: <?php namespace Config; Codes from App/Common.php PHP Code: <?php Could you please help me to solve this issue? Thanks in advance.
The file App/Common.php is designed to override system functions or to create globally-available functions. Therefore, this file is included at the very beginning of the start of the framework before, for example, services are defined. Call your function in some Controller or Helper instead.
// Edit: The url of the userguide have changed. |
Welcome Guest, Not a member yet? Register Sign In |