Pad the model index to 3 characters

This commit is contained in:
Josiah Dahl 2017-08-06 09:44:50 -07:00
parent 982dee15fc
commit afa5bf1f0c

View File

@ -24,7 +24,7 @@ class ResourcesCommand extends BaseCommand {
foreach ($content as $model => $i){ foreach ($content as $model => $i){
$i = $this->getResourceParams($model, $i); $i = $this->getResourceParams($model, $i);
$migrationName = 'Create' . ucwords(str_plural($i['name'])); $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', [ $this->call('wn:resource', [