laravel-achievements
laravel-achievements copied to clipboard
Images
Is there an expected or suggested way to include images to represent the badges? My solution at present is basically
<img src="{{ asset('img/badges/'.str_replace(' ', '_', $achievement->details->name). '.png') }}">
But maybe there's a better way? If so, it seems worth mentioning it in the docs, or maybe including a few different examples of tactics for associating images with your badges. :)
I confess that I haven't thought of that. :o
When I first developed this project, it was scoped entirely for usage on the backend - and frontend usage wasn't a issue at first.
How would you suggest that we should implement this?
Good question. If you really just want to stay focused on the back-end handling, it might be worth mentioning in your docs that there is no provided method for handling front-end display - It seemed so obvious to me that I spent a long time looking for how to do it with the package. Once I realized it didn't exist, it wasn't any trouble to design my own.
It would be great if there were documentation for frontend usage implementation.
<img src="/img/badges/{{ $a->details->name }}.png" data-toggle="tooltip" title="" height="50px" data-original-title="{{ $a->details->name }}">
thats what I do for now