/** * Create the tag for the specified language * * @param string $lang * @param array $name * @return mixed */ public function createForLanguage($lang, $name) { $this->cache->tags($this->entityName)->flush(); return $this->repository->createForLanguage($lang, $name); }
/** * Store a newly created resource in storage. * * @param CreateTagRequest $request * @return Response */ public function store(CreateTagRequest $request) { $tag = $this->tag->createForLanguage(App::getLocale(), $request->name); return Response::json($tag); }