option('migration')) { $table = Str::plural(Str::snake(class_basename($this->argument('name')))); $this->call('make:migration', ['name' => "create_{$table}_table", '--create' => $table]); } } } /** * Get the stub file for the generator. * * @return string */ protected function getStub() { return __DIR__.'/stubs/model.stub'; } /** * Get the default namespace for the class. * * @param string $rootNamespace * @return string */ protected function getDefaultNamespace($rootNamespace) { return $rootNamespace; } /** * Get the console command options. * * @return array */ protected function getOptions() { return [ ['migration', 'm', InputOption::VALUE_NONE, 'Create a new migration file for the model.'], ]; } }