Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error using generate:resource #421

Open
woganmay opened this issue Nov 12, 2014 · 2 comments
Open

Error using generate:resource #421

woganmay opened this issue Nov 12, 2014 · 2 comments

Comments

@woganmay
Copy link

So I tried using generate:resource, and everything worked well up until it tried creating the Controller:

[ErrorException]
  file_put_contents(/vagrant/app/Http/Controllers/GearsController.php): failed to open stream: No such file or directory

It should be /vagrant/app/Controllers - not sure where it's getting Http/ from, especially since the rest of the command has the path just fine:

Do you want me to create a Gear model? [yes|no] y
Created: /vagrant/app/Gear.php
Do you want me to create views for this Gear resource? [yes|no] y
Created: /vagrant/resources/views/Gears/index.blade.php
Created: /vagrant/resources/views/Gears/show.blade.php
Created: /vagrant/resources/views/Gears/create.blade.php
Created: /vagrant/resources/views/Gears/edit.blade.php
Do you want me to create a GearsController controller? [yes|no] y

Any ideas why this is happening? I'm using generators version 3, with laravel v4.2.11

@woganmay
Copy link
Author

Followup, it also breaks when trying to create the migration:

[ErrorException]
  file_put_contents(/vagrant/database/migrations/2014_11_12_143539_create_Gears_table.php): failed to open stream: No such file or directory

There it's missing the app/ folder this time.

@jonsa
Copy link

jonsa commented Nov 18, 2014

Generators version 3 is for the new Laravel 5 which is in development at the moment. If you want to use generators with Laravel 4 you should checkout 2.6.

If you're interested in what is changing in Laravel you can have a look at https://laracasts.com/series/whats-new-in-laravel-5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants