{"action":"created","issue":{"url":"https://api.github.com/repos/appzcoder/crud-generator/issues/68","repository_url":"https://api.github.com/repos/appzcoder/crud-generator","labels_url":"https://api.github.com/repos/appzcoder/crud-generator/issues/68/labels{/name}","comments_url":"https://api.github.com/repos/appzcoder/crud-generator/issues/68/comments","events_url":"https://api.github.com/repos/appzcoder/crud-generator/issues/68/events","html_url":"https://github.com/appzcoder/crud-generator/pull/68","id":145471229,"number":68,"title":"Fix indentation in generated migraions","user":{"login":"constant-null","id":7520877,"avatar_url":"https://avatars.githubusercontent.com/u/7520877?v=3","gravatar_id":"","url":"https://api.github.com/users/constant-null","html_url":"https://github.com/constant-null","followers_url":"https://api.github.com/users/constant-null/followers","following_url":"https://api.github.com/users/constant-null/following{/other_user}","gists_url":"https://api.github.com/users/constant-null/gists{/gist_id}","starred_url":"https://api.github.com/users/constant-null/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/constant-null/subscriptions","organizations_url":"https://api.github.com/users/constant-null/orgs","repos_url":"https://api.github.com/users/constant-null/repos","events_url":"https://api.github.com/users/constant-null/events{/privacy}","received_events_url":"https://api.github.com/users/constant-null/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-03T08:45:57Z","updated_at":"2016-04-03T18:05:09Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/appzcoder/crud-generator/pulls/68","html_url":"https://github.com/appzcoder/crud-generator/pull/68","diff_url":"https://github.com/appzcoder/crud-generator/pull/68.diff","patch_url":"https://github.com/appzcoder/crud-generator/pull/68.patch"},"body":"When generating migration with more then one fields, correct indentation have only the first one, others have none.\r\n\r\nFor example\r\n```php\r\n    public function up()\r\n    {\r\n        Schema::create('coins', function (Blueprint $table) {\r\n            $table->increments('id');\r\n            $table->integer('value');\r\n$table->integer('amount');\r\n$table->unique('value');\r\n\r\n            $table->timestamps();\r\n        });\r\n    }\r\n```\r\n\r\nThis PR fix it"},"comment":{"url":"https://api.github.com/repos/appzcoder/crud-generator/issues/comments/205023289","html_url":"https://github.com/appzcoder/crud-generator/pull/68#issuecomment-205023289","issue_url":"https://api.github.com/repos/appzcoder/crud-generator/issues/68","id":205023289,"user":{"login":"sohelamin","id":1708683,"avatar_url":"https://avatars.githubusercontent.com/u/1708683?v=3","gravatar_id":"","url":"https://api.github.com/users/sohelamin","html_url":"https://github.com/sohelamin","followers_url":"https://api.github.com/users/sohelamin/followers","following_url":"https://api.github.com/users/sohelamin/following{/other_user}","gists_url":"https://api.github.com/users/sohelamin/gists{/gist_id}","starred_url":"https://api.github.com/users/sohelamin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sohelamin/subscriptions","organizations_url":"https://api.github.com/users/sohelamin/orgs","repos_url":"https://api.github.com/users/sohelamin/repos","events_url":"https://api.github.com/users/sohelamin/events{/privacy}","received_events_url":"https://api.github.com/users/sohelamin/received_events","type":"User","site_admin":false},"created_at":"2016-04-03T18:05:09Z","updated_at":"2016-04-03T18:05:09Z","body":"Hi @constant-null Thanks for the PR.\r\nInstead of calculating the indentation I just put the number of tab in a the variable.\r\nLook at https://github.com/appzcoder/crud-generator/blob/1.0/src/Commands/CrudMigrationCommand.php#L93"}}