I see there is already an issue about this here #54
And seem already an old issue, see laravel/framework#4721
When running artisan via console, STDIN is already defined, but not when running via controller like generator-builder.
Defining STDIN fix issue, example:
if(! defined('STDIN')) define('STDIN', fopen("php://stdin","r"));