two-thirds/artisan-anywhere

2.0.0 2020-03-06 02:59 UTC

This package is auto-updated.

Last update: 2024-11-06 13:22:03 UTC


README

pipeline status coverage report

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());