public function destroy(Request $request, $commentId) { $comment = Comment::findOrFail($commentId); $this->authorize($comment); $comment->delete(); return $this->createDefaultResponse($request); }
public function run() { DB::table('blog_comments')->delete(); Comment::create(['id' => 1, 'user_id' => 1, 'post_id' => 1, 'text' => 'All GMs are faggots...', 'bluepost' => false]); Comment::create(['id' => 2, 'user_id' => 1, 'post_id' => 2, 'text' => 'Yay, devs are best!', 'bluepost' => false]); }