irazasyed / laravel-identicon

👤 Laravel Identicon Package

Home Page:https://bit.ly/laravel-identicon

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Class 'Identicon' not found

kingsloi opened this issue · comments

Hey, I've installed it via composer, added the service provider and facade, ran composer dump-auto, and in my view I'm using:

<img class="avatar" src="{{ Identicon::getImageDataUri('bar') }}">

However, I get this message:

Class 'Identicon' not found

Both packages exist, as do the classes, but still no bueno. Any ideas?

Hey @kingsloi,

What version of Laravel you use?

Hey Iraza - thanks for the quick reply!

I've just checked Application.php and apparently it's

5.0.32

Let me know if there's anything else I can do to help!

Thanks,
Kingsley

No problem.

I just tested on a fresh installation of Laravel 5 (5.0.32 version) and installed this package.

It works fine for me. Maybe it wasn't installed properly. Can you try installing again?

Also try clearing composer cache (composer clear-cache This clears cache fully, Unless you don't want to do that for whatever reasons, don't fire this command).

Let me know if it works.

Thanks.

Also, I just tested by removing the Facade. If the Facade is not added, then that error is shown too. So please check if Facade was added properly?

Give this a try too:

<img src="{{ app('identicon')->getImageDataUri('bar') }}" alt="bar Identicon" />

Hey Iraza,

I wish all my issues were handled this fast!

I've just cleared composer, reinstalled it via composer, dumped autoload, cleared artisan cache, and used app('identicon')-> but still nothing.

Here's my app.php
http://laravel.io/bin/XyyxQ

Composer.json
http://laravel.io/bin/Nkk6v

If it's working for you, I'm sure I've done something wrong but I can't figure out where

Thanks!
Kingsley

Sorry, I'm not even sure what's just occured. I deleted the app.php and ran

php artisan config:cache

Obviously breaking the app, but then reset the file via my last commit, added in the facade (so the exact same as before), and it magically worked!

Thanks for your support!
Kingsley

(p.s. go ahead and close/delete this - nothing wrong with your awesome package!)

Alright, Great. I was testing both of your files and it worked just fine.

Thanks for the update.

Syed