DEV Community


Laravel 8.x Multilevel Nested Comments System Tutorial

・1 min read

A Comment system is a primary requirement for blog website or any tutorial website. in this post i want to share with you how to create comments system in laravel 5, laravel 6, laravel 7 and laravel 8 app. Most of developer looking for good package for comment system, but if you are using laravel 5 then you can do it nested comment system using database relationship.

we will create very simple comment system with you can add comment and make replay to comment. we will use laravel relationship for comment system and it make it quick. you can also improve with add comment, edit comment, delete command and replay comment with ajax if you want.

After following this tutorial, you do not need to use any extra plugin for comment like disqus etc in your website.

in this example, we will create posts table and comments table using migration. you can create new post and in the detail page of post you can add comment on it. we will create laravel auth, create migration, controller, model and blade files. you just need to follow few steps to get live comment system with your website.
Laravel 8.x Multilevel Nested Comments System Tutorial

Discussion (0)