public function getJob($req) { $cr = new CategoriesRepository(); $categories = $cr->getAll(); $jr = new JobsRepository(); $job = $jr->getById($req->id); return $this->twig->render('job.html', compact('categories', 'job')); }
public function getEdit($req) { $jr = new JobsRepository(); $job = $jr->getById($req->id); $cr = new CategoriesRepository(); $categories = $cr->getAll(); $ar = new ApplicationsRepository(); $applications = $ar->getByJobId($req->id); return $this->twig->render('admin/jobs/edit.html', compact('job', 'categories', 'applications')); }
public function getIndex() { $cr = new CategoriesRepository(); $categories = $cr->getAll(); return $this->twig->render('admin/categories/index.html', compact('categories')); }