*/ protected function casts(): array { return [ 'year' => 'integer', 'sector' => ProjectSector::class, 'program' => ProjectProgram::class, ]; } /** * Newest projects first, as the site lists them. * * @param Builder $query */ public function scopeLatestFirst(Builder $query): void { $query->orderByDesc('year')->orderBy('id'); } }