PMCORE-3073

This commit is contained in:
Paula Quispe
2021-07-14 11:14:48 -04:00
parent b4f519d0f2
commit eec17295c0
4 changed files with 48 additions and 4 deletions

View File

@@ -232,6 +232,19 @@ class Application extends Model
return $query->whereIn('APPLICATION.APP_STATUS_ID', $statuses);
}
/**
* Scope a query to only include specific category
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @param int $category
*
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeCategory($query, $category)
{
return $query->where('PROCESS.CATEGORY_ID', $category);
}
/**
* Scope for query to get the applications by PRO_UID.
*