whereExists method

String whereExists (
  1. String filed,
  2. String operators,
  3. dynamic value
)

Implementation

String whereExists(String filed, String operators, dynamic value) {
  var op = operators == '' ? '' : "'$operators'" ',';
  return '${tableName[0].replaceAll('_', '').toUpperCase()}${tableName.substring(1).replaceAll('_', '')}'
      '::where($filed,$op$value)->exists()';
}