I have relationship batch and project

```js
function project(){
 return $this->hasMany(Project::class,'batch_id');
}

```

I need to get which batch is complete based on all projects (status = COMPLETED) as a Laravel accessor in model.

this is my sample data

[![enter image description here](https://i.stack.imgur.com/y2ahn.png)](https://i.stack.imgur.com/y2ahn.png)

please help. thanks!