Skip to content

Commit

Permalink
fix paths
Browse files Browse the repository at this point in the history
  • Loading branch information
taylorotwell committed Apr 3, 2017
1 parent be040b2 commit d196ab9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
7 changes: 4 additions & 3 deletions src/Application.php
Original file line number Diff line number Diff line change
Expand Up @@ -695,13 +695,14 @@ public function basePath($path = null)
}

/**
* Get the database path for the application.
* Get the path to the database directory.
*
* @param string $path
* @return string
*/
public function databasePath()
public function databasePath($path = '')
{
return $this->basePath().'/database';
return $this->basePath.DIRECTORY_SEPARATOR.'database'.($path ? DIRECTORY_SEPARATOR.$path : $path);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/helpers.php
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ function config($key = null, $default = null)
*/
function database_path($path = '')
{
return app()->databasePath().($path ? '/'.$path : $path);
return app()->databasePath($path);
}
}

Expand Down

0 comments on commit d196ab9

Please sign in to comment.