protected function checkMySqlDatabaseSize($connection)
    {
        try {
            $result = (array) DB::connection($connection)
                                ->table('information_schema.TABLES')
                                ->select(DB::raw("sum( data_length + index_length ) AS size"))
                                ->where('table_schema', DB::connection($connection)->getConfig('database'))
                                ->first();

            return $result['size'];
        } catch (Exception $e) {
            $this->eye->logger()->debug('Error during mySQL DB size check', ['exception' => $e->getMessage(), 'connection' => $connection]);
        }

        return -1;
    }
protected function checkMySqlDatabaseSize($connection)
    {
        try {
            $result = (array) DB::connection($connection)
                                ->table('information_schema.TABLES')
                                ->select(DB::raw("sum( data_length + index_length ) AS size"))
                                ->where('table_schema', DB::connection($connection)->getConfig('database'))
                                ->first();

            return $result['size'];
        } catch (Exception $e) {
            $this->eye->logger()->debug('Error during mySQL DB size check', ['exception' => $e->getMessage(), 'connection' => $connection]);
        }

        return -1;
    }
protected function checkMySqlDatabaseSize ( $ connection ) { try { $ result = ( array ) DB :: connection ( $ connection ) -> table ( 'information_schema.TABLES' ) -> select ( DB :: raw ( "sum( data_length + index_length ) AS size" ) ) -> where ( 'table_schema' , DB :: connection ( $ connection ) -> getConfig ( 'database' ) ) -> first ( ) ; return $ result [ 'size' ] ; } catch ( Exception $ e ) { $ this -> eye -> logger ( ) -> debug ( 'Error during mySQL DB size check' , [ 'exception' => $ e -> getMessage ( ) , 'connection' => $ connection ] ) ; } return - 1 ; }
Return the size of the mySql database.

@param  string  $connection
@return int
Return the size of the mySql database .