Laravel 5和方式/发电机

Srđ*_*vić 1 php laravel way-generators

我尝试加入way/generatorslaravel 5.0

我按照以下步骤操作:

  1. 我把它包括进去 require dev: require way/generators --dev
"require-dev": {
    "phpunit/phpunit": "~4.0",
    "phpspec/phpspec": "~2.1,
    "way/generators" : "~3.0"
},
  1. 我这样做composer update,也是我尝试的composer update --dev

  2. 我向providers数组添加了一个新项.

'Way\Generators\GeneratorsServiceProvider'
  1. 现在,当我输入:php artisan在控制台我得到错误

    异常'BadMethodCallException',消息'调用未定义的方法[package]'在C:\ xampp\htdocs\testni\storage\framework\compiled.php:4351堆栈跟踪:

小智 5

对于Laravel 5,Jeffrey Way已经创建了Laravel 5 Extended Generators.

https://github.com/laracasts/Laravel-5-Generators-Extended

你甚至可以在Laracasts网站上看到它.

https://laracasts.com/lessons/faster-workflow-with-generators

它仍然使用php artisan命令,但到目前为止还有3种其他方法

  • mmake:迁移:架构
  • 令:迁移:支点
  • 令:种子

要安装 - composer需要laracasts/generators --dev