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:
<?php $path = database_path();

$path = database_path('factories/UserFactory.php');
<?php         'sqlite' => [

            'driver' => 'sqlite',

            'url' => env('DB_URL'),

            'database' => env('DB_DATABASE', database_path('database.sqlite')),

            'prefix' => '',

            'foreign_key_constraints' => env('DB_FOREIGN_KEYS', true),

        ],
<?php         if ($this->option('prune')) {

            (new Filesystem)->deleteDirectory(

                database_path('migrations'), $preserve = false

            );



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

    {

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

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

        });

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

        }



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

            return $path;

        }
<?php             return $path;

        }



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

    }

}