Class Central is learner-supported. When you buy through links on our site, we may earn an affiliate commission.

Independent

Build a Livewire Comment System

via Independent

Overview

Coursera Flash Sale
40% Off Coursera Plus for 3 Months!
Grab it
Build a drop-in comment system with Livewire that instantly works for any model.
We’ll cover top-level comments and replies by re-using Livewire components, editing and deleting comments, working with Alpine.js to minimise network requests, building an Alpine.js directive to display when a comment was posted, handling deleted users and loading more comments gradually.

Once you’re done, you can drop a single Livewire comments component wherever you need it — and comments will instantly be enabled.

Syllabus

  • 01. Introduction and demo
  • 02. Setting up
  • 03. Polymorphic comments
  • 04. Posting comments
  • 05. Displaying top level comments
  • 06. Toggling replying to a comment
  • 07. Replying to a comment
  • 08. Listening to events with Alpine
  • 09. Showing comment replies
  • 10. Eager loading on comments
  • 11. Preventing unlimited reply nesting
  • 12. Toggling editing
  • 13. Editing comments
  • 14. Deleting comments
  • 15. Adding simple avatars
  • 16. Automatically updating relative dates
  • 17. Handling deleted users
  • 18. Loading more comments

Taught by

Alex Garrett-Smith

Reviews

Start your review of Build a Livewire Comment System

Never Stop Learning.

Get personalized course recommendations, track subjects and courses with reminders, and more.

Someone learning on their laptop while sitting on the floor.