This package provides generate documentation about your app console commands.
Run commands:
composer require --dev artarts36/artisan-documentator
php artisan vendor:publish --provider="ArtARTs36\ArtisanDocumentator\Providers\ArtisanDocumentatorServiceProvider" --tag=config
After installation, you can run command php artisan command:doc {path}
. Example: php artisan command:doc docs/command.md
You can set command's namespaces in the file: config/artisan_documentator.php
in section 'namespaces':
'namespaces' => [
// 'namespace:' => 'title,
// 'app:' => 'App Commands',
// 'make:' => 'Laravel make Commands',
],
In order to use generation in CI you need to specify your login and token in the file in the file: config/artisan_documentator.php
in section 'git.remotes':
'git' => [
'dir' => base_path(),
'remote' => [
'login' => 'my-name',
'token' => env('ARTISAN_DOCUMENTATOR_GIT_REMOTE_TOKEN'),
],
'commit' => [
'message' => '[DOCS] auto-build console documentation',
],
],
Command call in your CI conf file:
php artisan command:doc docs/command.md --ci
Must fill property description
in console commands for full documentation.
Use the PHP CS Fixer rule PhpCsFixerGoodFixers/laravel_command_no_empty_description
to prevent undescribed commands from entering your repository.