original_string: protected function getMigrationFileName(Filesystem $filesystem): string
      {
          $timestamp = date('Y_m_d_His');
  
          return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR)
              ->flatMap(function ($path) use ($filesystem) {
                  return $filesystem->glob($path.'*_create_permission_tables.php');
              })->push($this->app->databasePath()."/migrations/{$timestamp}_create_permission_tables.php")
              ->first();
      }
code: protected function getMigrationFileName(Filesystem $filesystem): string
      {
          $timestamp = date('Y_m_d_His');
  
          return Collection::make($this->app->databasePath().DIRECTORY_SEPARATOR.'migrations'.DIRECTORY_SEPARATOR)
              ->flatMap(function ($path) use ($filesystem) {
                  return $filesystem->glob($path.'*_create_permission_tables.php');
              })->push($this->app->databasePath()."/migrations/{$timestamp}_create_permission_tables.php")
              ->first();
      }
code_tokens: protected function getMigrationFileName ( Filesystem $ filesystem ) : string { $ timestamp = date ( 'Y_m_d_His' ) ; return Collection :: make ( $ this -> app -> databasePath ( ) . DIRECTORY_SEPARATOR . 'migrations' . DIRECTORY_SEPARATOR ) -> flatMap ( function ( $ path ) use ( $ filesystem ) { return $ filesystem -> glob ( $ path . '*_create_permission_tables.php' ) ; } ) -> push ( $ this -> app -> databasePath ( ) . "/migrations/{$timestamp}_create_permission_tables.php" ) -> first ( ) ; }
docstring: Returns existing migration file if found, else uses the current timestamp.
  
  @param Filesystem $filesystem
  @return string
docstring_tokens: Returns existing migration file if found else uses the current timestamp .