/** * Get the migration stub file. * * @param string $table * @param bool $stub * * @return string */ protected function getStub($table, $stub = null) { if (is_null($table) || is_null($stub)) { return $this->files->get($this->getStubPath() . '/blank.stub'); } else { // We also have stubs for creating new tables and modifying existing tables // to save the developer some typing when they are creating a new tables // or modifying existing tables. We'll grab the appropriate stub here. return $this->files->get($this->getStubPath() . "/{$stub}.stub"); } }
protected function getCompileFiles($location) { $files = []; if ($this->files->exists($location)) { $extension = $this->files->extension($location); if ($extension == 'php') { return include $location; } $paths = $this->files->get($location); $paths = explode("\n", $paths); $paths = array_unique($paths); foreach ($paths as $file) { if (!empty($file) && substr($file, 0, 1) !== '#') { $files[] = $file; } } } return $files; }