Open haidarvm opened 4 years ago
@walkor , @passwalls , please I really need this feature. I would definitely donate this project soon
Webman currently does not strictly specify the location of custom function & library.
You can put your helper functions into for example app/functions.php
.
And add line "./app/functions.php"
in composer.json
like this.
"autoload": {
"files": [
"./support/helpers.php",
"./app/functions.php"
]
},
Run command composer dump-autoload
then the ./app/functions.php
will be loaded automatically .
Make your class file conform to psr4 rules, and it will be loaded automatically. For example app/common/User.php.
namespace app\common;
class User
{
}
It will be loaded automatically when it used.
Oh, Ok i got it. For temporary I will using composer psr4
Just Like Codeigniter or any other php framework, they have Helper / Library for custom function & library
for example I create multiple Controller and want to call the function
allowTags()
in any controller