1// This works 2if ( 0 === $model->where('status', 'pending')->count() ) { 3} 4 5// But since I don't care about the count, just that there isn't one 6// Laravel's exists() method is cleaner. 7if ( ! $model->where('status', 'pending')->exists() ) { 8} 9 10// But I find the ! in the statement above easily missed. The11// doesntExist() method makes this statement even clearer.12if ( $model->where('status', 'pending')->doesntExist() ) {13}
Tip given by @ShawnHooper