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 getEdit($req) { $cr = new CategoriesRepository(); $category = $cr->getById($req->id); return $this->twig->render('admin/categories/edit.html', compact('category')); }