Back to the Learning!

Laracasts is packed full with over 1,000 lessons just like this one.

Sign up to get full access or log in to your account and sit back.

Published On Jul. 30th 2018

Unlocking Badges Workshop: Viewing Achievements: Part 1

Episode 12 Run Time 4:36

Download

Much of this feature is now working, so let's finally view it in the browser. We'll start by preparing a few sample achievement badges, and then seeding and fetching a user's achievements. Once we have this information, it should be as simple as looping through all available achievements, and toggling a CSS class that indicates if the current user has been awarded the related badge.