protected function seeRowsWereReturned($table, $data)
    {
        // If the user has imported the Laravel application trait, we can use Laravel to
        // work with the database.

        if (isset($this->app) || in_array('Laracasts\Integrated\Services\Laravel\Application', class_uses($this))) {
            return $this->app['db']->table($table)->where($data)->count();
        }

        // Otherwise, we'll default to the database adapter that Integrated provides.

        return $this->getDbAdapter()->table($table)->whereExists($data);
    }
protected function seeRowsWereReturned($table, $data)
    {
        // If the user has imported the Laravel application trait, we can use Laravel to
        // work with the database.

        if (isset($this->app) || in_array('Laracasts\Integrated\Services\Laravel\Application', class_uses($this))) {
            return $this->app['db']->table($table)->where($data)->count();
        }

        // Otherwise, we'll default to the database adapter that Integrated provides.

        return $this->getDbAdapter()->table($table)->whereExists($data);
    }
protected function seeRowsWereReturned ( $ table , $ data ) { // If the user has imported the Laravel application trait, we can use Laravel to // work with the database. if ( isset ( $ this -> app ) || in_array ( 'Laracasts\Integrated\Services\Laravel\Application' , class_uses ( $ this ) ) ) { return $ this -> app [ 'db' ] -> table ( $ table ) -> where ( $ data ) -> count ( ) ; } // Otherwise, we'll default to the database adapter that Integrated provides. return $ this -> getDbAdapter ( ) -> table ( $ table ) -> whereExists ( $ data ) ; }
Get the number of rows that match the given condition.

@param  string $table
@param  array $data
@return integer
Get the number of rows that match the given condition .