This commit is contained in:
Paula Quispe
2019-05-13 16:44:40 -04:00
parent 4064c1bebf
commit ff33075228
14 changed files with 1655 additions and 303 deletions

View File

@@ -20,4 +20,16 @@ class Task extends Model
{
return $this->hasMany(Delegation::class, 'TAS_ID', 'TAS_ID');
}
/**
* Scope a query to only include self-service
*
* @param \Illuminate\Database\Eloquent\Builder $query
* @return \Illuminate\Database\Eloquent\Builder
*/
public function scopeIsSelfService($query)
{
return $query->where('TAS_ASSIGN_TYPE', '=', 'SELF_SERVICE')
->where('TAS_GROUP_VARIABLE', '=', '');
}
}