From 862d428c0b930a7f65579fc9cfc3e031c09f7797 Mon Sep 17 00:00:00 2001 From: milanandjelkovic Date: Wed, 25 Mar 2015 10:09:54 +0100 Subject: [PATCH] modification of path to generated migrations and seeds --- src/Commands/MigrationMakeCommand.php | 2 +- src/Commands/PivotMigrationMakeCommand.php | 2 +- src/Commands/SeedMakeCommand.php | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/Commands/MigrationMakeCommand.php b/src/Commands/MigrationMakeCommand.php index 904e7ba..862ef33 100644 --- a/src/Commands/MigrationMakeCommand.php +++ b/src/Commands/MigrationMakeCommand.php @@ -133,7 +133,7 @@ protected function makeDirectory($path) */ protected function getPath($name) { - return './database/migrations/' . date('Y_m_d_His') . '_' . $name . '.php'; + return base_path() . '/database/migrations/' . date('Y_m_d_His') . '_' . $name . '.php'; } /** diff --git a/src/Commands/PivotMigrationMakeCommand.php b/src/Commands/PivotMigrationMakeCommand.php index c16d51d..7976709 100644 --- a/src/Commands/PivotMigrationMakeCommand.php +++ b/src/Commands/PivotMigrationMakeCommand.php @@ -70,7 +70,7 @@ protected function getStub() */ protected function getPath($name = null) { - return './database/migrations/' . date('Y_m_d_His') . + return base_path() . '/database/migrations/' . date('Y_m_d_His') . '_create_' . $this->getPivotTableName() . '_pivot_table.php'; } diff --git a/src/Commands/SeedMakeCommand.php b/src/Commands/SeedMakeCommand.php index c350442..3ffe87e 100644 --- a/src/Commands/SeedMakeCommand.php +++ b/src/Commands/SeedMakeCommand.php @@ -57,6 +57,6 @@ protected function getStub() */ protected function getPath($name) { - return './database/seeds/' . str_replace('\\', '/', $name) . '.php'; + return base_path() . '/database/seeds/' . str_replace('\\', '/', $name) . '.php'; } }