montross50 / artisan-commands-helper
Laravel artisan 命令助手。提供开发过程中需要的基于Docker的基本命令的快捷方式。
1.1.0
2018-11-10 18:41 UTC
Requires
- php: ~5.6|~7.0
- illuminate/support: ^5.0,<5.8
Requires (Dev)
- orchestra/testbench: ~3.6
- phpunit/phpunit: ~7.0
- squizlabs/php_codesniffer: ^3.1
README
此包将为artisan添加一些有用的命令。这些命令主要用于开发,以减少输入并提高生产力。
安装
composer require montross50/artisan-commands-helper
可用命令
ach:build Builds the containers with docker compose
ach:clean Cleans up the containers with docker compose
ach:clean-images Removes dangling images with docker
ach:dump Composer dump autoload in the php workspace container
ach:ide-helper Runs the ide-helper in the php workspace container
ach:install Composer installs in the php workspace container
ach:migrate Migrate the database
ach:rebuild Spins up the containers with docker compose and rebuild them
ach:run Spins up the containers with docker compose (alias for up)
ach:seed Seed your database
ach:stop Stops the containers with docker compose
ach:up Spins up the containers with docker compose
ach:update Composer updates in the php workspace container
环境配置
您可以在.env文件中添加几个环境变量来自定义命令。此配置旨在与标准Laravel安装配合使用Docker和Laradock或类似工具。以下为环境变量及其默认值。
- ACH_DOCKER_PATH = docker
- Docker可执行文件的路径
- ACH_DOCKER_COMPOSE_PATH = docker-compose
- Docker Compose可执行文件的路径
- ACH_COMPOSER_PATH = composer
- Composer可执行文件的路径
- ACH_NAMESPACE = ach
- 命令解析的命名空间,通过artisan即ach:up。以防该命名空间已存在
- ACH_PHP_CONTAINER = workspace
- 运行php命令的容器
- ACH_IDE_HELPER_MODELS_OPTIONS = -n
- ide-helper:models的选项。这些选项中通常包含特殊字符,因此artisan可能不会很好地处理
或者您可以发布配置文件。
php artisan vendor:publish --provider="Montross50\ArtisanCommandsHelper\ArtisanCommandsHelperServiceProvider" --tag=config
变更日志
有关最近更改的更多信息,请参阅CHANGELOG。
贡献
有关详细信息,请参阅CONTRIBUTING和CONDUCT。
安全
如果您发现任何与安全相关的问题,请通过电子邮件sch43228@gmail.com联系,而不是使用问题跟踪器。
鸣谢
- Trent Schmidt
许可证
MIT许可证(MIT)。有关更多信息,请参阅许可证文件。