for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
namespace ByTIC\Migrations\Config\Traits;
/**
* Trait HasPathsTrait
* @package ByTIC\Migrations\Config\Traits
*/
trait HasPathsTrait
{
* @param $path
public function addBasePath($path)
$this->setPath($path . DIRECTORY_SEPARATOR . 'migrations', 'migrations');
$this->setPath($path . DIRECTORY_SEPARATOR . 'seeds', 'seeds');
}
* @param $type
public function setPath($path, $type = 'migrations')
$path = is_array($path) ? $path : [$path];
$this->params['paths'][$type] = $path;
params
* Register a custom migration path.
*
* @param string $path
* @param string $type
* @return void
public function path($path, $type = 'migrations')
$this->params['paths'][$type] = array_unique(array_merge($this->params['paths'][$type], [$path]));
* @return mixed
public function paths($type = 'migrations')
return $this->params['paths'][$type];