I make a "HelperCommand" to generate helper in Laravel. "HelperCommand" will create a file in "app/Console/Commands/Helpers".
php artisan helper:command time.php
public function handle()
{
$name = $this->argument('name');
File::put(app_path().'/Console/Commands/Helpers/'.$name, '');
}
I manually add file name in composer.json :
"autoload": {
"files": [
"app/Console/Commands/Helpers/time.php"
]
}
My question is how to automatically add autoload when generating helper?
thanks!