/** * Get the migration stub file. * * @param string $table * @param bool $create * @return string */ protected function getStub($table, $create) { if ($this->input->getOption('fields')) { return $this->files->get($this->getStubPath() . '/fields.stub'); } if ($this->input->getOption('stream')) { return $this->files->get($this->getStubPath() . '/stream.stub'); } if (is_null($table)) { return $this->files->get($this->getStubPath() . '/blank.stub'); } return parent::getStub($table, $create); }
/** * Get the migration stub file. * * @param string $table * @param bool $create * @return string */ protected function getStub($table, $create) { if (is_null($table)) { if ($this->module) { return $this->files->get(__DIR__ . '/stubs/blank.stub'); } return parent::getStub($table, $create); } else { $stub = $create ? 'create.stub' : 'update.stub'; if ($this->module) { return $this->files->get(__DIR__ . "/stubs/{$stub}"); } return parent::getStub($table, $create); } }