/** * Update the specified resource in storage. * * @param Tag $id * @param Request $request * @return RedirectResponse */ public function update($id, Request $request) { $this->tag = Tag::find($id); $this->tag->update($request->all()); Flash::success(trans('tag::messages.tag updated')); return $this->toIndex(); }
/** * Get all tags matching given type/s * * @param array $types * * @return array */ public static function getTagsByType($types) { array_map('ucfirst', $types); return Tag::whereIn('status', ['Active', 'Hidden'])->whereIn('type', $types)->lists('name', 'name'); }