哪些 migration 会执行?

August 30, 2018
laravel migration

php artisan migrate 后会执行以下步骤

/**
   * Get all of the migration files in a given path.
   *
   * @param  string|array  $paths
   * @return array
   */
  public function getMigrationFiles($paths)
  {
      return Collection::make($paths)->flatMap(function ($path) {
          return $this->files->glob($path.'/*_*.php');
      })->filter()->sortBy(function ($file) {
          return $this->getMigrationName($file);
      })->values()->keyBy(function ($file) {
          return $this->getMigrationName($file);
      })->all();
  }
/**
 * Get the completed migrations.
 *
 * @return array
 */
public function getRan()
{
    return $this->table()
            ->orderBy('batch', 'asc')
            ->orderBy('migration', 'asc')
            ->pluck('migration')->all();
}

laravel queue(database) 多个 worker 有竞争关系?

laravel queue database

Studly Words in Laravel

laravel