{"action":"created","issue":{"url":"https://api.github.com/repos/JeffreyWay/Laravel-4-Generators/issues/394","labels_url":"https://api.github.com/repos/JeffreyWay/Laravel-4-Generators/issues/394/labels{/name}","comments_url":"https://api.github.com/repos/JeffreyWay/Laravel-4-Generators/issues/394/comments","events_url":"https://api.github.com/repos/JeffreyWay/Laravel-4-Generators/issues/394/events","html_url":"https://github.com/JeffreyWay/Laravel-4-Generators/issues/394","id":43318162,"number":394,"title":"file_put_contents: failed to open stream: No such file or directory","user":{"login":"cob05","id":978824,"avatar_url":"https://avatars.githubusercontent.com/u/978824?v=3","gravatar_id":"","url":"https://api.github.com/users/cob05","html_url":"https://github.com/cob05","followers_url":"https://api.github.com/users/cob05/followers","following_url":"https://api.github.com/users/cob05/following{/other_user}","gists_url":"https://api.github.com/users/cob05/gists{/gist_id}","starred_url":"https://api.github.com/users/cob05/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cob05/subscriptions","organizations_url":"https://api.github.com/users/cob05/orgs","repos_url":"https://api.github.com/users/cob05/repos","events_url":"https://api.github.com/users/cob05/events{/privacy}","received_events_url":"https://api.github.com/users/cob05/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2014-09-20T19:49:55Z","updated_at":"2015-04-05T20:33:20Z","closed_at":"2014-09-20T20:29:20Z","body":"Getting the following exception while following along with a Laracasts tutorial:\r\n\r\n[ErrorException]                                                                                                                                               \r\n  file_put_contents(/home/vagrant/code/app1/database/migrations/2014_09_20_194400_create_users_table.php): failed to open stream: No such file or directory\r\n\r\nCommand:\r\nphp artisan generate:migration create_users_table --fields=\"username(25):string:unique, email:string:unique, password:string(64)\"\r\n\r\nUsing homestead.  Already checked permissions and the vagrant user can write to the folder.  No other problems using the generators for controllers, etc...\r\n\r\nEdit: Just noticed that it is missing the 'app' directory under app1(test laravel app name)\r\n\r\nEdit 2: Edited config.php under the generators config folder and updated this line to include 'app/':\r\n\r\n/**/     'migration_target_path'   => base_path('app/database/migrations'),      /**/\r\n\r\n\r\nand that worked."},"comment":{"url":"https://api.github.com/repos/JeffreyWay/Laravel-4-Generators/issues/comments/89847739","html_url":"https://github.com/JeffreyWay/Laravel-4-Generators/issues/394#issuecomment-89847739","issue_url":"https://api.github.com/repos/JeffreyWay/Laravel-4-Generators/issues/394","id":89847739,"user":{"login":"cloudEdwards","id":10618229,"avatar_url":"https://avatars.githubusercontent.com/u/10618229?v=3","gravatar_id":"","url":"https://api.github.com/users/cloudEdwards","html_url":"https://github.com/cloudEdwards","followers_url":"https://api.github.com/users/cloudEdwards/followers","following_url":"https://api.github.com/users/cloudEdwards/following{/other_user}","gists_url":"https://api.github.com/users/cloudEdwards/gists{/gist_id}","starred_url":"https://api.github.com/users/cloudEdwards/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cloudEdwards/subscriptions","organizations_url":"https://api.github.com/users/cloudEdwards/orgs","repos_url":"https://api.github.com/users/cloudEdwards/repos","events_url":"https://api.github.com/users/cloudEdwards/events{/privacy}","received_events_url":"https://api.github.com/users/cloudEdwards/received_events","type":"User","site_admin":false},"created_at":"2015-04-05T20:33:19Z","updated_at":"2015-04-05T20:33:19Z","body":"Just to Clarify for any one else having this problem.  This is caused by the config set up for Jeffery Ways generator tools being set for Laravel 5. I am using Laravel 4.2. So for me the config file was here.\r\n    vendor/way/generators/src/config/config.php\r\n\r\nAll of the generated files are pointing to the wrong places. I changed it to this\r\n```php\r\n /*\r\n    |--------------------------------------------------------------------------\r\n    | Where the generated files will be saved...\r\n    |--------------------------------------------------------------------------\r\n    |\r\n    */\r\n    'model_target_path'   => app_path(),\r\n\r\n    'controller_target_path'   => base_path('app/controllers'),\r\n\r\n    'migration_target_path'   => base_path('app/database/migrations'),\r\n\r\n    'seed_target_path'   => base_path('app/database/seeds'),\r\n\r\n    'view_target_path'   => base_path('app/views')\r\n```\r\n\r\nI wrote this comment with out testing until now. And it worked !! Yay!"}}