laravel-achievements icon indicating copy to clipboard operation
laravel-achievements copied to clipboard

Images

Open swirlingskirts opened this issue 6 years ago • 4 comments

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. :)

swirlingskirts avatar Aug 30 '18 00:08 swirlingskirts

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?

gabs-simon avatar Aug 30 '18 21:08 gabs-simon

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.

swirlingskirts avatar Aug 31 '18 01:08 swirlingskirts

It would be great if there were documentation for frontend usage implementation.

JerryWebster avatar Aug 31 '18 20:08 JerryWebster

<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

HDVinnie avatar Sep 18 '18 02:09 HDVinnie