PMCORE-3104
This commit is contained in:
@@ -355,6 +355,24 @@ class Application extends Model
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Scope the Draft cases
|
||||
*
|
||||
* @param \Illuminate\Database\Eloquent\Builder $query
|
||||
* @param string $user
|
||||
*
|
||||
* @return \Illuminate\Database\Eloquent\Builder
|
||||
*/
|
||||
public function scopeDraft($query, $user)
|
||||
{
|
||||
// Filter the status draft
|
||||
$query->statusId(Application::STATUS_DRAFT);
|
||||
// Filter the creator
|
||||
$query->creator($user);
|
||||
|
||||
return $query;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Applications by PRO_UID, ordered by APP_NUMBER.
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user