How can I create a condition using current query with laravel query builder, is it even possible, i guess it would look something like this
$record = $this->repository
->where('value', $value)
->when($thisQuery->get()->isNotEmpty(), static function(){
//execute
});