Skip to content

Commit 124696c

Browse files
authored
Merge pull request #12 from appkr/fix-typo-in-pr9
PR 9번에 있던 오타 수정
2 parents d4f34e1 + 8afe82f commit 124696c

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

app/Http/Controllers/ArticlesController.php

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -178,25 +178,25 @@ public function update(ArticlesRequest $request, Article $article)
178178
public function destroy(Article $article)
179179
{
180180
$this->authorize('delete', $article);
181-
181+
182182
$this->deleteAttachments($article->attachments);
183-
183+
184184
$article->delete();
185185

186186
event(new \App\Events\ModelChanged(['articles']));
187187

188188
return response()->json([], 204, [], JSON_PRETTY_PRINT);
189189
}
190-
190+
191191
public function deleteAttachments(Collection $attachments)
192192
{
193193
$attachments->each(function ($attachment) {
194-
$filePath = $attachments_path($attachment->filename);
195-
194+
$filePath = attachments_path($attachment->filename);
195+
196196
if (File::exists($filePath)) {
197197
File::delete($filePath);
198198
}
199-
199+
200200
return $attachment->delete();
201201
});
202202
}

0 commit comments

Comments
 (0)