two-thirds / artisan-anywhere
2.0.0
2020-03-06 02:59 UTC
Requires
- php: >=7.2.5
- illuminate/support: ^6.0|^7.0
- nunomaduro/collision: ^2.1|^3.0|^4.1
- orchestra/testbench: ^4.0|^5.0
- symfony/console: ^4.0|^5.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^2.13
- phpmd/phpmd: ^2.6
- phpunit/phpunit: ~9.0
README
Add Laravel Artisan to anything! Simply require through composer, drop a file in the root of your project and register any commands that you want available. This is a simple way to add custom utility commands ( like CI or stubbing content ) to non-Laravel projects ( like packages or other frameworks ).
Installation
Composer
Laravel Artisan Anywhere can be installed through composer:
composer require --dev two-thirds/artisan-anywhere
Create Artisan File
Add an artisan
file to the root of your project with the following content and add your commands to the registerCommands
array:
#!/usr/bin/env php
<?php
require 'vendor/autoload.php';
$artisan = new TwoThirds\ArtisanAnywhere\Artisan(__DIR__);
$artisan->registerCommands([
Illuminate\Foundation\Console\TestMakeCommand::class,
]);
exit($artisan->handle());