Files
laravel_modules/src/Publishing/MigrationPublisher.php
T
2026-11-20 12:06:31 +00:00

43 lines
758 B
PHP

<?php
namespace absdev\Modules\Publishing;
use absdev\Modules\Migrations\Migrator;
class MigrationPublisher extends AssetPublisher
{
/**
* @var Migrator
*/
private $migrator;
/**
* MigrationPublisher constructor.
*/
public function __construct(Migrator $migrator)
{
$this->migrator = $migrator;
parent::__construct($migrator->getModule());
}
/**
* Get destination path.
*
* @return string
*/
public function getDestinationPath()
{
return $this->repository->config('paths.migration');
}
/**
* Get source path.
*
* @return string
*/
public function getSourcePath()
{
return $this->migrator->getPath();
}
}