<?php

namespace App\Controllers;

use App\Models\JobModel;

class Home extends BaseController
{
    public function index()
    {
        $jobModel = new JobModel();
        $recentJobs = $jobModel->searchPublic([], 1, 6);

        return view('home/index', ['jobs' => array_map(fn ($j) => $j->toArray(), $recentJobs)]);
    }
}
