| @@ 321-328 (lines=8) @@ | ||
| 318 | * |
|
| 319 | * @return \Illuminate\Http\RedirectResponse |
|
| 320 | */ |
|
| 321 | public function getDeleteAttachment(Project $project, Issue $issue, Attachment $attachment) |
|
| 322 | { |
|
| 323 | $issue->setRelation('project', $project); |
|
| 324 | $attachment->setRelation('issue', $issue); |
|
| 325 | $attachment->updater()->delete(); |
|
| 326 | ||
| 327 | return redirect($issue->to())->with('notice', trans('tinyissue.attachment_has_been_deleted')); |
|
| 328 | } |
|
| 329 | ||
| 330 | /** |
|
| 331 | * Display an attachment file such as image. |
|
| @@ 368-375 (lines=8) @@ | ||
| 365 | * |
|
| 366 | * @return \Illuminate\Http\RedirectResponse |
|
| 367 | */ |
|
| 368 | public function postAddNote(Project $project, Note $note, FormRequest\Note $request) |
|
| 369 | { |
|
| 370 | $note->setRelation('project', $project); |
|
| 371 | $note->setRelation('createdBy', $this->getLoggedUser()); |
|
| 372 | $note->updater()->create($request->all()); |
|
| 373 | ||
| 374 | return redirect($note->to())->with('notice', trans('tinyissue.your_note_added')); |
|
| 375 | } |
|
| 376 | ||
| 377 | /** |
|
| 378 | * Ajax: To update project note. |
|