2017 © Pedro Peláez
 

library external_artisan

External Artisan provides artisan tools for non-laravel projects

image

darunada/external_artisan

External Artisan provides artisan tools for non-laravel projects

  • Wednesday, March 1, 2017
  • by darunada
  • Repository
  • 1 Watchers
  • 1 Stars
  • 3 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 2 Forks
  • 0 Open issues
  • 1 Versions
  • 0 % Grown

The README.md

External Artisan

Forked from dosjein/external_artisan and made usable., (*1)

Artisan the task runner in Laravel. This library makes it easy to use artisan commands in your own projects., (*2)

Installation with Composer

curl -s http://getcomposer.org/installer | php
php composer.phar require darunada/external-artisan
{
  "require": {
    "darunada/external-arisan":"dev-master"
  }
}

Usage

Installation

To use this library, copy the ./artisan file to your project root., (*3)

Usage

  • $ php artisan list will display a list of available commands.
  • $ php artisan help [command] will display help text for the command

The Artisan Page for Laravel 5.3 may present you with some options of how to use this library., (*4)

Creating Commands

By default I put my commands in ./commands. You can override the path to commands in the artisan file., (*5)

Any available commands need to be registered with Artisan. This is done in Darunada\Console\ArtisanKernel and will load a config.php file located in your commands folder., (*6)

To autoload all classes in the commands file, add the following to your composer.json, (*7)

{
  "autoload": {
    "classmap": [
      "commands"
    ]
  }
}

````

#### Service Injection
Service injection doesn't work.  Instead, a Pimple Container is passed into
the Command constructor with the things you might need.

I will add services to this list as I need them.  Or, feel free to add 
your own.  You can also instantiate them yourself inside your commands.
+ `$container['filesystem']` is an `Illuminate\Filesystem\Filesystem`
+ `$container['database']` is a `Medoo\Medoo` [Documentation](http://medoo.in/doc) _I don't really love it, though_

These services are provided in `\Darunada\Console\InitArtisan`

/** @var Medoo */ private $database;, (*8)

public function __construct($container) { parent::__construct(); $this->database = $container['database']; } ```, (*9)

Todo

  • Test??

The Versions

01/03 2017

dev-master

9999999-dev

External Artisan provides artisan tools for non-laravel projects

  Sources   Download

BSD-3-Clause

The Requires

 

The Development Requires

by Ronalds Sovas

commands command line utility artisan tools utilities