Exemple #1
0
 /**
  * Update the specified resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(TagsRequest $request, $id)
 {
     $tag = Tag::find($id)->fill($request->all())->save();
     return redirect()->route('tags.show', $id);
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  int $id
  * @return Response
  */
 public function update(Tags $tags, TagsRequest $request)
 {
     $tags->update($request->input());
     Session::flash('message', 'Тег обновлён');
     return redirect()->route('admin.tags.index');
 }
Exemple #3
0
 /**
  * Store a newly created resource in storage.
  *
  * @param  \Illuminate\Http\Request  $request
  * @return \Illuminate\Http\Response
  */
 public function store(TagsRequest $request)
 {
     $tag = Tag::create($request->all());
     return Redirect::route('special.index');
 }
 /**
  * Update the specified resource in storage.
  *
  * @param  \App\Http\Requests\TagsRequest $request
  * @param  Tags  $tags
  * @return \Illuminate\Http\Response
  */
 public function update(Tags $tags, TagsRequest $request)
 {
     $tags->update($request->all());
     return redirect('tags');
 }