Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/Illuminate/Foundation/Console/VendorPublishCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,13 @@ class VendorPublishCommand extends Command
*/
protected $description = 'Publish any publishable assets from vendor packages';

/**
* Indicates if migration dates should be updated while publishing.
*
* @var bool
*/
protected static $updateMigrationDates = true;

/**
* Create a new command instance.
*
Expand Down Expand Up @@ -341,6 +348,10 @@ protected function createParentDirectory($directory)
*/
protected function ensureMigrationNameIsUpToDate($from, $to)
{
if (static::$updateMigrationDates === false) {
return $to;
}

$from = realpath($from);

foreach (ServiceProvider::publishableMigrationPaths() as $path) {
Expand Down Expand Up @@ -381,4 +392,14 @@ protected function status($from, $to, $type)
$to,
));
}

/**
* Intruct the command to not update the dates on migrations when publishing.
*
* @return void
*/
public static function dontUpdateMigrationDates()
{
static::$updateMigrationDates = false;
}
}