Skip to content

Commit 8948ac9

Browse files
authored
Merge pull request #35 from webfactor/better-indent-for-migrations-and-request
Better indent for migration and request
2 parents ffbf804 + 7486b3a commit 8948ac9

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

src/Services/BackpackCrudRequestService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,6 @@ protected function buildFileContent()
2323

2424
protected function replaceValidationRules()
2525
{
26-
$this->fileContent = str_replace('__rules__', ShortSyntaxArray::parse($this->command->schema->getValidationRules()->toArray()), $this->fileContent);
26+
$this->fileContent = str_replace('__rules__', ShortSyntaxArray::parse($this->command->schema->getValidationRules()->toArray(), true, 12), $this->fileContent);
2727
}
2828
}

src/Services/MigrationService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ protected function generateMigrationFields(): string
5050
$migrationFields = '';
5151

5252
foreach ($this->command->schema->getMigrationFields() as $migrationField) {
53-
$migrationFields .= '$table->' . $migrationField['type'] . '(\'' . $migrationField['name'] . '\')';
53+
$migrationFields .= ' $table->' . $migrationField['type'] . '(\'' . $migrationField['name'] . '\')';
5454
unset($migrationField['type'], $migrationField['name']);
5555

5656
if (!empty($migrationField)) {

stubs/migration.stub

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ class __class_name__ extends Migration
1414
{
1515
Schema::create('__table_name__', function (Blueprint $table) {
1616
$table->increments('id');
17-
__migration_fields__
17+
__migration_fields__
1818
$table->timestamps();
1919
});
2020
}

0 commit comments

Comments
 (0)