Feature/task order (#3807)
This commit is contained in:
parent
82818414a3
commit
2680fe4c8e
3 changed files with 5 additions and 3 deletions
|
@ -41,7 +41,8 @@ class TaskRepository extends EloquentRepository implements TaskRepositoryInterfa
|
|||
public function getNextTask(int $schedule, int $index)
|
||||
{
|
||||
return $this->getBuilder()->where('schedule_id', '=', $schedule)
|
||||
->where('sequence_id', '=', $index + 1)
|
||||
->orderBy('sequence_id', 'asc')
|
||||
->where('sequence_id', '>', $index)
|
||||
->first($this->getColumns());
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue