Пример #1
0
 /**
  * Update the specified resource in storage.
  * 
  * @param \App\Http\Requests\IssueRequest $request
  * @param  int  $id
  * @return \Illuminate\Http\Response
  */
 public function update(IssueRequest $request, $id)
 {
     $input = $request->all();
     $model = Issue::findOrFail($id);
     $model->update($input);
     $tags = $request->input('tag_list', []);
     // Add its tags
     $model->tags()->sync($tags);
     \Session::flash('status', 'The issue has been updated successfully');
     return redirect()->action('Issues@grid');
 }
Пример #2
0
 /**
  * Update an issue in storage.
  *
  * @return Response
  */
 public function update(Issue $issue, IssueRequest $request)
 {
     $issue->update($request->all());
     Session::flash('issueUpdate', $issue->title);
     return redirect('projects/' . $issue->project_id);
 }