src/Commands/Install.php
public function guessDatabaseName()
    {
        try {
            $segments = array_reverse(explode(DIRECTORY_SEPARATOR, app_path()));
            $name = explode('.', $segments[1])[0];

            return Str::slug($name);
        } catch (Exception $e) {
            return '';
        }
    }
public function guessDatabaseName()
    {
        try {
            $segments = array_reverse(explode(DIRECTORY_SEPARATOR, app_path()));
            $name = explode('.', $segments[1])[0];

            return Str::slug($name);
        } catch (Exception $e) {
            return '';
        }
    }
public function guessDatabaseName ( ) { try { $ segments = array_reverse ( explode ( DIRECTORY_SEPARATOR , app_path ( ) ) ) ; $ name = explode ( '.' , $ segments [ 1 ] ) [ 0 ] ; return Str :: slug ( $ name ) ; } catch ( Exception $ e ) { return '' ; } }
Guess database name from app folder.

@return string
Guess database name from app folder .