/** * Show the users index page. * * @return \Response */ public function getIndex() { //$users = $this->users->findAllPaginated(); $tagList = $this->tags->listAll(); $categoryList = $this->categories->listAll(); $userList = $this->users->listAllCompany(); $this->view('admin.users.jobOpp', compact('tagList', 'categoryList', 'userList')); }
/** * Show the edit trick page. * * @param string $slug * @return \Response */ public function getEdit($slug) { $trick = $this->trick->findBySlug($slug); $tagList = $this->tags->listAll(); $categoryList = $this->categories->listAll(); $selectedTags = $this->trick->listTagsIdsForTrick($trick); $selectedCategories = $this->trick->listCategoriesIdsForTrick($trick); $this->view('tricks.edit', ['tagList' => $tagList, 'selectedTags' => $selectedTags, 'categoryList' => $categoryList, 'selectedCategories' => $selectedCategories, 'trick' => $trick]); }
public function getcvNew() { if (!empty(\Auth::user()->user_cat)) { $tagList = $this->tags->listAll(); $user_cat = \Auth::user()->user_cat; if ($user_cat == 2) { return \Redirect::to('user/tricks/new'); } } $id = \Auth::user()->id; $cv_exp = CvExp::find($id); //$items = CvExp::where('id','=',$id)->get(); $items = \DB::table('cv_exp_v1')->where('cv_exp_v1.id', '=', $id)->select('cv_exp_v1.id', 'cv_exp_v1.from_date', 'cv_exp_v1.to_date', 'cv_exp_v1.period', 'cv_exp_v1.exp_type', 'cv_exp_v1.created_at', 'cv_exp_v1.title', 'cv_exp_v1.des', 'cv_exp_v1.updated_at', 'cv_exp_v1.ser', 'cv_exp_v1.tag_id')->get(); $cv = Cv::find($id); if (isset($cv)) { return $this->view('cv.new', compact('cv', 'cv_exp', 'items', 'tagList')); } elseif (isset($cv_exp)) { return $this->view('cv.new', compact('cv', 'cv_exp', 'items', 'tagList')); } else { return $this->view('cv.new', compact('tagList')); } }