Skip to content

Commit

Permalink
删除话题
Browse files Browse the repository at this point in the history
  • Loading branch information
liyu001989 committed Aug 6, 2020
1 parent f6b8cfe commit 44849fa
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions app/Http/Controllers/Api/TopicsController.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,13 @@ public function update(TopicRequest $request, Topic $topic)
$topic->update($request->all());
return new TopicResource($topic);
}

public function destroy(Topic $topic)
{
$this->authorize('destroy', $topic);

$topic->delete();

return response(null, 204);
}
}

0 comments on commit 44849fa

Please sign in to comment.