我正在使用laravel 4.2和way generator 3. *,当我使用脚手架命令时会发生这种情况
php artisan generate:scaffold city --fields="name:string,state:string"
Do you want me to create a City model? [yes|no] yes
Created: /var/www/secondone/second/app/City.php
Do you want me to create views for this City resource? [yes|no] yes
Created: /var/www/secondone/second/resources/views/cities/index.blade.php
Created: /var/www/secondone/second/resources/views/cities/show.blade.php
Created: /var/www/secondone/second/resources/views/cities/create.blade.php
Created: /var/www/secondone/second/resources/views/cities/edit.blade.php
Do you want me to create a CitiesController controller? [yes|no] yes
[ErrorException]
file_put_contents(/var/www/secondone/second/app/Http/Controllers/CitiesController.php
): failed to open stream: No such file or directory
generate:scaffold [--fields[="..."]] resource
为什么会这样?
答案 0 :(得分:5)
您需要使用发电机2. * 3. *版本适用于即将推出的laravel 5版本(尚未发布)。