(eg: Winter.Blog)} {factory : The name of the factory to generate. (eg: PostFactory)} {--m|model= : The name of the model. (eg: Post)} {--f|force : Overwrite existing files with generated files.} {--uninspiring : Disable inspirational quotes} '; /** * @var string The console command description. */ protected $description = 'Creates a new factory.'; /** * @var array List of commands that this command replaces (aliases) */ protected $replaces = [ 'make:factory', ]; /** * @var string The type of class being generated. */ protected $type = 'Factory'; /** * @var string The argument that the generated class name comes from */ protected $nameFrom = 'factory'; /** * @var array A mapping of stubs to generated files. */ protected $stubs = [ 'scaffold/factory/factory.stub' => 'database/factories/{{studly_name}}.php', ]; protected function processVars($vars): array { $vars = parent::processVars($vars); $vars['model'] = $this->option('model'); return $vars; } }