@@ 158-166 (lines=9) @@ | ||
155 | * |
|
156 | * @return \Illuminate\Http\RedirectResponse |
|
157 | */ |
|
158 | public function postNew(Project $project, Issue $issue, FormRequest\Issue $request) |
|
159 | { |
|
160 | $issue->setRelation('project', $project); |
|
161 | $issue->setRelation('user', $this->auth->user()); |
|
162 | $issue->createIssue($request->all()); |
|
163 | ||
164 | return redirect($issue->to()) |
|
165 | ->with('notice', trans('tinyissue.issue_has_been_created')); |
|
166 | } |
|
167 | ||
168 | /** |
|
169 | * Edit an existing issue form. |
|
@@ 202-210 (lines=9) @@ | ||
199 | * |
|
200 | * @return \Illuminate\Http\RedirectResponse |
|
201 | */ |
|
202 | public function postEdit(Project $project, Issue $issue, FormRequest\Issue $request) |
|
203 | { |
|
204 | $issue->setRelation('project', $project); |
|
205 | $issue->setRelation('updatedBy', $this->auth->user()); |
|
206 | $issue->updateIssue($request->all()); |
|
207 | ||
208 | return redirect($issue->to()) |
|
209 | ->with('notice', trans('tinyissue.issue_has_been_updated')); |
|
210 | } |
|
211 | ||
212 | /** |
|
213 | * To close or reopen an issue. |