This commit is contained in:
@@ -40,8 +40,14 @@ class SchoolYearModel extends Model
|
||||
|
||||
public function active(): ?array
|
||||
{
|
||||
return $this->where('status', 'active')
|
||||
$rows = $this->where('status', 'active')
|
||||
->orderBy('id', 'DESC')
|
||||
->first();
|
||||
->findAll(2);
|
||||
|
||||
if (count($rows) !== 1) {
|
||||
return null;
|
||||
}
|
||||
|
||||
return $rows[0];
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user