montross50 / artisan-commands-helper
Laravel artisan commands helper. Provides shortcuts to basic docker-centric commands needed during development.
Installs: 1 183
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
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
This package will add some helpful commands to artisan. These commands are primarily used in development to reduce typing and increase productivity.
Installation
composer require montross50/artisan-commands-helper
Available Commands
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
Environment configuration
There are several environment variables you can add to your .env that will allow you to customize the commands. This is designed to work out of the box for a standard laravel install with docker and laradock or similiar. Below are the env vars and their defaults.
- ACH_DOCKER_PATH = docker
- Path to docker executable
- ACH_DOCKER_COMPOSE_PATH = docker-compose
- Path to docker-compose executable
- ACH_COMPOSER_PATH = composer
- Path to composer executable
- ACH_NAMESPACE = ach
- Namespace that commands resolve at via artisan ie ach:up. Just in case you have something on that namespace
- ACH_PHP_CONTAINER = workspace
- Container to run php commands in
- ACH_IDE_HELPER_MODELS_OPTIONS = -n
- Options for ide-helper:models. These options have special chars in them often so artisan won't play nice
Alternatively you can publish the config file.
php artisan vendor:publish --provider="Montross50\ArtisanCommandsHelper\ArtisanCommandsHelperServiceProvider" --tag=config
Change log
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING and CONDUCT for details.
Security
If you discover any security related issues, please email sch43228@gmail.com instead of using the issue tracker.
Credits
- Trent Schmidt
License
The MIT License (MIT). Please see License File for more information.