fix positions
This commit is contained in:
@@ -22,6 +22,7 @@ class JobPositionModel extends Model
|
||||
'requirements',
|
||||
'status',
|
||||
'posted_by',
|
||||
'posted_at',
|
||||
'created_at',
|
||||
'updated_at',
|
||||
];
|
||||
@@ -31,6 +32,18 @@ class JobPositionModel extends Model
|
||||
|
||||
public function openPositions(): array
|
||||
{
|
||||
return $this->where('status', 'open')->orderBy('created_at', 'DESC')->findAll();
|
||||
return $this
|
||||
->where('status', 'open')
|
||||
->orderBy('posted_at', 'DESC')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->findAll();
|
||||
}
|
||||
|
||||
public function adminPositions(): array
|
||||
{
|
||||
return $this
|
||||
->orderBy('updated_at', 'DESC')
|
||||
->orderBy('created_at', 'DESC')
|
||||
->findAll();
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user