Skip to content

Commit

Permalink
[feat] Indicate a sub-path for modules specific migration file
Browse files Browse the repository at this point in the history
Co-Authored-By: Abdul Majid Irfan <[email protected]>
Co-Authored-By: Delowar Hossain <[email protected]>
  • Loading branch information
3 people committed Apr 27, 2023
1 parent bf20927 commit 0e0730f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Migrations/Migrator.php
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ class Migrator
* @var string|null
* @example subpath 2000_01_01_000000_create_example_table.php
*/
protected $subpath = null;
protected $subpath = '';

/**
* The database connection to be used
Expand Down Expand Up @@ -98,7 +98,7 @@ public function getPath()
*/
public function getMigrations($reverse = false)
{
if ($this->subpath) {
if (!empty($this->subpath)) {
$files = $this->laravel['files']->glob($this->getPath() . '/' . $this->subpath);
} else {
$files = $this->laravel['files']->glob($this->getPath() . '/*_*.php');
Expand Down

0 comments on commit 0e0730f

Please sign in to comment.