Laravel artisan commands helper. Provides shortcuts to basic docker-centric commands needed during development.
This package will add some helpful commands to artisan. These commands are primarily used in development to reduce typing and increase productivity.
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
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
Please see CHANGELOG for more information what has changed recently.
If you discover any security related issues, please email firstname.lastname@example.org instead of using the issue tracker.
- Trent Schmidt
The MIT License (MIT). Please see License File for more information.