database_path

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     {

        $from = __DIR__.'/stubs/auth/statamic_auth_tables.php.stub';

        $file = date('Y_m_d_His', time()).'_statamic_auth_tables';

        $to = database_path("migrations/{$file}.php");



        $contents = File::get($from);
<?php     public function handle()

    {

        File::put(

            database_path().'/migrations/'.date('Y_m_d_His').'_create_users_tables.php',

            File::get(__DIR__.'/stubs/create_users_tables.php.stub')

        );

    }