/** * @param $id * @param TagRequest $request * @return \Illuminate\Http\RedirectResponse|\Illuminate\Routing\Redirector */ public function update($id, TagRequest $request) { // $tags = Tags::findorfail($id); $tags->update($request->all()); return redirect(action('TagsController@index')); }
/** * Update the specified resource in storage. * * @param Request $request * @param int $id * @return Response */ public function update(TagRequest $request, $id) { $tag = Tag::findOrFail($id); $tag->update($request->all()); flash('Tag has been updated'); return Redirect::back(); }
public function store(TagRequest $request) { $tag = new Tag($request->all()); $tag->save(); Flash::success("Se ha agregado el tag " . $tag->name . " de manera exitosa!"); return redirect()->route('admin.tags.index'); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Requests\TagRequest $request, $id) { $tag = Tag::findOrFail($id); $input = $request->all(); $tag->update($input); return redirect()->action('Goenitz\\TagController@index'); }
/** * Update the specified resource in storage. * * @param int $id * @param TagRequest $request * @return Response */ public function update($id, TagRequest $request) { $input = $request->all(); $this->tagRepository->update($id, $input); Flash::message('Tag updated'); return Redirect()->route('tags'); }
public function store(TagRequest $request) { $tag = new Tag($request->all()); $tag->save(); Flash::success('El tag ' . $tag->nombre . ' se registro con exito!!'); return redirect()->route('admin.tags.index'); }
/** * Store a newly created resource in storage. * * @return Response */ public function store(TagRequest $request) { $user = \Auth::user(); // $newTags = array(); // foreach(explode(" ", $request->input("name")) as $new) // { // $newTags = array("name" => $new); // Tag::create($newTags); // } $count = DB::table('tag_faculty')->where('username', $user->username)->count(); if ($count < 4) { Tag::create($request->all()); $forQuery = Tag::orderBy('created_at', 'desc')->first(); DB::table('tag_faculty')->insert(['tag_id' => $forQuery->id, 'username' => $user->username]); // $tags = DB::table('tag_faculty') // ->join('tags', 'tag_faculty.tag_id', '=', 'tags.id') // ->join('users', 'tag_faculty.username', '=', 'users.username') // ->where('users.username', $user->username) // ->get(); return redirect('/dash-board'); } else { $error = "Your tag limit has exceeded"; return redirect('/dash-board')->withErrors($error); } // dd($request->input('tags')); // Tag::create($request->all()); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(TagRequest $request) { $tag = new Tag($request->all()); $tag->save(); Flash::success('El tag ' . $tag->name . ' ha sido creado con éxito.'); return redirect()->route('admin.tags.index'); }
/** * Store a newly created resource in storage. * * @param \Illuminate\Http\Request $request * @return \Illuminate\Http\Response */ public function store(TagRequest $request) { $tag = Tag::create($request->all()); $tag->save(); Session::flash('message_create', "El tag - " . $request->name . " - fue creado exitosamente!"); return redirect()->route('admin.tags.index'); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(TagRequest $request, $id) { $tag = Tag::find($id); $tag->fill($request->all()); $tag->save(); Flash::success("Tag " . $tag->name . " fue editada con éxito"); return redirect()->route('admin.tags.index'); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(TagRequest $request, $id) { $tag = Tag::find($id); $tag->fill($request->all()); $tag->save(); Flash::warning('El tag ' . $tag->name . ' ha sido editada con exito'); return redirect()->route('admin.tags.index'); }
public function store(TagRequest $request) { //$this->createTags($request); $tag = new Tag(); $tag->name = $request->input('name'); $tag->save(); \Session::flash('flash_message', 'Tag has been added!'); return redirect('tags'); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param Tag $tag * @return \Illuminate\Http\Response */ public function update(TagRequest $request, Tag $tag) { if (is_null($request->input('navigation'))) { $request->request->add(['navigation' => 0]); } $tag->update($request->all()); session()->flash('flash_message', 'Se ha actualizado el nombre de la etiqueta'); return redirect('admin/tags'); }
/** * Chỉnh sửa * * @param Tag $tag * @return Response */ public function update(Tag $tag, TagRequest $request, ImageInterface $image) { $data = $request->all(); if ($request->hasFile('image')) { // Trước hết cần xóa các file ảnh cũ nếu có if ($tag->image) { \File::delete(public_path(config("image.paths") . 'tags/large' . $tag->image)); } $image->init($request, 'tags')->save('large'); $data = array_replace($data, ['image' => $image->name]); } $tag->update($data); return redirect('admin/tag')->with('flash_message', config('blog.message.updated')); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(TagRequest $request, $id) { $tag = Tag::findOrFail($id); $attributes = $request->all(); if ($tag->slug != str_slug($request->input('name'))) { $slug = $this->getSlug($request->input('name'), false); if ($slug == false) { flash()->error('You need a different name!'); return redirect('admin/tags/' . $id . '/edit'); } $attributes['slug'] = $slug; } $tag->update($attributes); return redirect('admin/tags'); }
/** * Edit tag * * @param int $id * @return Response */ public function editTag($domain, TagRequest $request, $id) { if ($request->isMethod('put')) { $tagModel = new Tag(); $tag = $tagModel->updateItem($id, $request->all()); } $tag = Tag::find($id); return view('admin.tag.edit-tag', compact('tag')); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(TagRequest $request, Tag $tag) { if ($tag->update($request->all())) { Flash::success('修改成功!'); return Redirect::back()->withInput(); } else { Flash::error('修改失败!'); return Redirect::back()->withInput(); } }
/** * Update the specified resource in storage. * * @param int $id * * @return Response */ public function update(TagRequest $request, $id) { $tag = Tag::findOrFail($id); $tag->update($request->all()); return redirect('admin/tags/index'); }
private function createTag(TagRequest $request) { $tag = Tag::create($request->all()); $this->syncVideos($tag, $request->input('video_list')); return $tag; }
/** * Update the specified resource in storage. * * @param TagRequest $request * @param int $id * * @return \Illuminate\Http\RedirectResponse */ public function update(TagRequest $request, $id) { $this->repository->update($id, $request->except(['_token', '_method'])); return redirect()->route('admin.tags.index'); }
/** * Update the specified resource in storage. * * @param TagRequest $request * @param int $id * * @return \Illuminate\Http\RedirectResponse */ public function update(TagRequest $request, $id) { $this->tags->update($request->all(), $id); return redirect()->route('admin.tags.index'); }
/** * Update the specified resource in storage. * * @param TagRequest $request * @param Tag $tag * @return \Illuminate\Http\Response */ public function update(TagRequest $request, Tag $tag) { $tag->update($request->all()); flash()->success('Tag has been updated'); return redirect('/admin/tag'); }
/** * edit tag * * @param TagRequest $request * @return Response */ public function editTag(TagRequest $request) { $tag = new Tag(); $id = $request->get('id'); return $tag->updateItem($id, $request->all()); }
/** * Update the tag * @param $date */ public function update($id, TagRequest $request) { $tag = Tag::findOrFail($id); $tag->update($request->all()); return redirect('tags'); }
/** * Update the specified resource in storage. * * @param int $id * @param TagRequest $request * @return Response */ public function update($id, TagRequest $request) { $tag = $this->tag->find($id); if (is_null($tag)) { return redirect()->route('tag.index')->with('error', 'Tag not found.'); } if ($tag->update($request->all())) { return redirect('tag')->with('success', 'Tag successfully updated!'); } return redirect('tag')->with('error', 'Problem updating Tag!'); }
/** * Update the specified resource in storage. * * @param int $id * @return Response */ public function update(TagRequest $request, Tag $tag) { $tag->update($request->all()); \Flash::success('Your tag has been Updated'); return redirect('admin/tags'); }
/** * Store a newly created resource in storage. * * @return Response */ public function store(TagRequest $request) { Tag::create($request->all()); return redirect('tags'); }
public function store(TagRequest $request) { $this->tag->create($request->all()); \Flash::success(trans('message.entity_saved', ['entity' => trans('models.tag')])); return redirect()->route('admin.tags.index'); }