From afa5bf1f0c71391b882f6964592a57d27d0c9688 Mon Sep 17 00:00:00 2001 From: Josiah Dahl Date: Sun, 6 Aug 2017 09:44:50 -0700 Subject: [PATCH] Pad the model index to 3 characters --- src/Commands/ResourcesCommand.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Commands/ResourcesCommand.php b/src/Commands/ResourcesCommand.php index 6055ff2..0b1456c 100644 --- a/src/Commands/ResourcesCommand.php +++ b/src/Commands/ResourcesCommand.php @@ -24,7 +24,7 @@ class ResourcesCommand extends BaseCommand { foreach ($content as $model => $i){ $i = $this->getResourceParams($model, $i); $migrationName = 'Create' . ucwords(str_plural($i['name'])); - $migrationFile = date('Y_m_d_His') . $modelIndex . '_' . snake_case($migrationName) . '_table'; + $migrationFile = date('Y_m_d_His') . '-' . str_pad($modelIndex , 3, 0) . '_' . snake_case($migrationName) . '_table'; $this->call('wn:resource', [