Skip to content

Commit

Permalink
Merge pull request #98 from orangehill/noindex
Browse files Browse the repository at this point in the history
Changed --index=0 option to --noindex
  • Loading branch information
tihomiro authored May 9, 2017
2 parents 87ab2ab + 71cc1a3 commit 40578a0
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -137,13 +137,13 @@ The following example will only assign a `someGroupEvent` to `groups` table seed
artisan iseed users,groups --postrun=,someGroupEvent
```

### indexed
By using --indexed=0 the seed can be generated as a non-indexed array.
### noindex
By using --noindex the seed can be generated as a non-indexed array.
The use case for this feature is when you need to merge two seed files.

Example:
```
artisan iseed users --indexed=0
artisan iseed users --noindex
```

## Usage
Expand Down
4 changes: 2 additions & 2 deletions src/Orangehill/Iseed/IseedCommand.php
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ public function fire()
$prerunEvents = explode(",", $this->option('prerun'));
$postrunEvents = explode(",", $this->option('postrun'));
$dumpAuto = intval($this->option('dumpauto'));
$indexed = boolval($this->option('indexed'));
$indexed = !$this->option('noindex');

if ($chunkSize < 1) {
$chunkSize = null;
Expand Down Expand Up @@ -139,7 +139,7 @@ protected function getOptions()
array('prerun', null, InputOption::VALUE_OPTIONAL, 'prerun event name', null),
array('postrun', null, InputOption::VALUE_OPTIONAL, 'postrun event name', null),
array('dumpauto', null, InputOption::VALUE_OPTIONAL, 'run composer dump-autoload', true),
array('indexed', null, InputOption::VALUE_OPTIONAL, 'index items in the seed', true),
array('noindex', null, InputOption::VALUE_NONE, 'no indexing in the seed', null),
);
}

Expand Down

0 comments on commit 40578a0

Please sign in to comment.