code: protected function populateStub(string $filename, string $stub, ?string $table = null): string
      {
          $search = ['{name}', '{table}'];
          $replace = [$filename, $table ?: 'dummy_table'];
  
          return str_replace($search, $replace, $stub);
      }
docs: Populate the place-holders in the migration stub.
  
  @param  string  $filename
  @param  string  $stub
  @param  string  $table
  @return string