The database_path function returns the fully qualified path to your application's database directory. You may also use the database_path function to generate a fully qualified path to a given file within the database directory:
$path database_path();

$path database_path('factories/UserFactory.php');
        if ($this->option('prune')) {

            (new 
Filesystem)->deleteDirectory(

                
database_path('migrations'), $preserve false

            
);



            
$info .= ' and pruned';
    protected function path(Connection $connection)

    {

        return 
tap($this->option('path') ?: database_path('schema/'.$connection->getName().'-schema.dump'), function ($path) {

            (new 
Filesystem)->ensureDirectoryExists(dirname($path));

        });

    }
            return $this->option('schema-path');

        }



        if (
file_exists($path database_path('schema/'.$connection->getName().'-schema.dump'))) {

            return 
$path;

        }
            return $path;

        }



        return 
database_path('schema/'.$connection->getName().'-schema.sql');

    }

}