/** * 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]); }
/** * Handle the editting of a tag. * * @param mixed $id * @return \Illuminate\Http\RedirectResponse */ public function postView($id) { $form = $this->tags->getForm(); if (!$form->isValid()) { return $this->redirectRoute('admin.tags.view', $id)->withErrors($form->getErrors())->withInput(); } $tag = $this->tags->update($id, $form->getInputData()); return $this->redirectRoute('admin.tags.view', $id); }
/** * Add URLs to dynamic pages of the site. * * @return void */ public function addDynamicRoutes() { $tricks = $this->tricks->findAllForSitemap(); foreach ($tricks as $trick) { $this->sitemap->add(URL::to("tricks/{$trick->slug}"), $trick->created_at, '0.9', 'weekly'); } $categories = $this->categories->findAll(); foreach ($categories as $category) { $this->sitemap->add(URL::to("categories/{$category->slug}"), $category->created_at, '0.9', 'daily'); } $tags = $this->tags->findAll(); foreach ($tags as $tag) { $this->sitemap->add(URL::to("tags/{$tag->slug}"), $tag->created_at, '0.9', 'daily'); } return $this->sitemap; }
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')); } }
/** * Show the tags index. * * @return \Response */ public function getTagIndex() { $tags = $this->tags->findAllWithTrickCount(); $this->view('browse.tags', compact('tags')); }
/** * Get all the tags to include in the sitemap. * * @return \Illuminate\Database\Eloquent\Collection|\Tricks\Tag[] */ public function getTags() { return $this->tags->findAll(); }