php-telegram-bot / laravel

Laravel package for PHP Telegram Bot Library
Other
171 stars 51 forks source link

Added create directories before creating file #52

Closed Impeck closed 1 year ago

Impeck commented 1 year ago

Bug fix if no directories are created

php artisan make:telegram-command Menu

ErrorException

file_put_contents(/var/www/html/app/Telegram/Commands/MenuCommand.php): Failed to open stream: No such file or directory

at vendor/php-telegram-bot/laravel/src/Console/Commands/GeneratorCommand.php:28 24▕ // } 25▕ 26▕ $content = file_get_contents($source); 27▕ $content = $this->replacePlaceholder($content, $replacements); ➜ 28▕ file_put_contents($destination, $content); 29▕ 30▕ return true; 31▕ } 32▕

Impeck commented 1 year ago

Please add to the description that you first need to run "php artisan telegram:publish" to create the directory structure then this pull request is not needed.

TiiFuchs commented 1 year ago

We will streamline the setup procedure the next days and improve the readme, we will double check on this issue. I think there are better ways to solve this... Need to check first. Closing this...