项目作者: Niellles

项目描述 :
Ports commands from Laravel to Lumen. Mostly make commands at this time.
高级语言: PHP
项目地址: git://github.com/Niellles/lumen-commands.git
创建时间: 2016-02-14T21:34:43Z
项目社区:https://github.com/Niellles/lumen-commands

开源协议:Other

下载


Lumen version
Packagist Version
GitHub release (latest by date including pre-releases)
GitHub issues Packagist License

lumen-commands

This package adds commands that you may know from Laravel, but aren’t supported in Lumen by default.

Installation

It’s recommended to only use this package in your development environment. You will not need these commands in production and Laravel left them out for a reason.
Add "niellles/lumen-commands": "dev-master" to "require-dev" in your composer.json.

  1. "require-dev": {
  2. ...
  3. "niellles/lumen-commands": "^1.0.0"
  4. }

Add the following lines to your app.php:

  1. if (env('APP_ENV') === 'local') {
  2. $app->bind(Illuminate\Database\ConnectionResolverInterface::class, Illuminate\Database\ConnectionResolver::class);
  3. $app->register(Niellles\LumenCommands\LumenCommandsServiceProvider::class);
  4. }

You can now run the commands, like you would under a Laravel installation, from your CLI of choice:
php artisan make:model test

Currently supported Commands

Not all of Laravel’s commands are included in this package. At this point it’s only some make:* commands that I really missed.
If you miss a particular command feel free to request it, or better yet: create it yourself (not much more than copy/paste) and do a pull-request.

  • make:console {name}
  • make:controller {name}
  • make:exception {name}
  • make:job {name}
  • make:middleware {name}
  • make:model {name}
  • make:seed {name}