Skip to content

Commit

Permalink
allow to create sub directory automatically. fix pingpong-labs/module…
Browse files Browse the repository at this point in the history
  • Loading branch information
Gravitano committed May 18, 2015
1 parent 869bc9c commit e621a27
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/Pingpong/Modules/Commands/GeneratorCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,11 @@ abstract protected function getDestinationFilePath();
*/
public function fire()
{
$path = $this->getDestinationFilePath();
$path = str_replace('\\', '/', $this->getDestinationFilePath());

if (! $this->laravel['files']->isDirectory($dir = dirname($path))) {
$this->laravel['files']->makeDirectory($path, 0777, true);
}

$contents = $this->getTemplateContents();

Expand Down

0 comments on commit e621a27

Please sign in to comment.