fix job positions
Deploy to Shared Hosting / Shared hosting deploy (push) Failing after 48s
Tests / PHPUnit (push) Successful in 1m22s

This commit is contained in:
root
2026-09-03 13:01:36 -04:00
parent c70f6bdc6e
commit 9e2f858343
9 changed files with 75 additions and 5 deletions
+10
View File
@@ -23,6 +23,7 @@ class JobPositionModel extends Model
'status',
'posted_by',
'posted_at',
'details_click_count',
'created_at',
'updated_at',
];
@@ -39,6 +40,15 @@ class JobPositionModel extends Model
->findAll();
}
public function recordDetailsClick(string $positionId): bool
{
return $this->builder()
->set('details_click_count', 'COALESCE(details_click_count, 0) + 1', false)
->where('position_id', $positionId)
->where('status', 'open')
->update();
}
public function adminPositions(): array
{
return $this