Skip to content

Commit

Permalink
Use the default models in SeedCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
amranidev committed Dec 11, 2018
1 parent f1fbed3 commit 52daa22
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/Console/Commands/SeedCommand.php
Expand Up @@ -15,7 +15,6 @@ class SeedCommand extends LaracombeeCommand
*/
protected $signature = 'laracombee:seed
{type : Catalog type (user or item)}
{--class= : Laravel model}
{--chunk= : total chunk}';

/**
Expand Down Expand Up @@ -56,14 +55,9 @@ public function __construct()
*/
public function handle()
{
if (!$this->option('class')) {
$this->error('--class option is required!');
die();
}

$chunk = (int) $this->option('chunk') ?: self::$chunk;

$class = $this->option('class');
$class = config('laracombee.'.$this->argument('type'));

$records = $class::all();

Expand Down

0 comments on commit 52daa22

Please sign in to comment.