Giter Club home page Giter Club logo

Comments (16)

dieume-n avatar dieume-n commented on June 20, 2024 2

Solved by running php artisan config:cache to clear and rebuild the configuration cache

from avatar.

sectorf8 avatar sectorf8 commented on June 20, 2024

Same here :(

from avatar.

uyab avatar uyab commented on June 20, 2024

Did you override the configuration?
Could you provide sample code?
Could you provide the complete error message + stack trace?

from avatar.

shohanean avatar shohanean commented on June 20, 2024

Same Error!

from avatar.

shohanean avatar shohanean commented on June 20, 2024

Can not do anything at controller, not at blade. Any suggestions?

from avatar.

uyab avatar uyab commented on June 20, 2024

@shohanean please provide some code snippet so I can suggests what is wrong

from avatar.

hemant17 avatar hemant17 commented on June 20, 2024

@shohanean please provide some code snippet so I can suggests what is wrong

there is nothing special code snippet we just following the simple install step - https://github.com/laravolt/avatar#output-as-base64
it just shows that error. with default laravel install and with installed.

from avatar.

uyab avatar uyab commented on June 20, 2024

If so, could yo provide the full stack trace of the error here?

from avatar.

shohanean avatar shohanean commented on June 20, 2024

Yes nothing special code

from avatar.

uyab avatar uyab commented on June 20, 2024

@shohanean full error message please 😄

from avatar.

shohanean avatar shohanean commented on June 20, 2024

I just require the package, then published the vendor.
In my controller which is Called ProfileController.php I added
Use use Avatar;
Then in index method I just tried to echo like this:
echo Avatar::create('Joko Widodo')->toBase64();
Then the error came out!

from avatar.

shohanean avatar shohanean commented on June 20, 2024

Error
Class name must be a valid object or a string

from avatar.

shohanean avatar shohanean commented on June 20, 2024

In line:
vendor\laravolt\avatar\src\ServiceProvider.php:38

from avatar.

uyab avatar uyab commented on June 20, 2024

So it is related to config file:

  // Initial generator class
    'generator' => \Laravolt\Avatar\Generator\DefaultGenerator::class,

Could you confirm that you have that entry in config/laravolt/avatar.php ?

Or, you can check using php artisan tinker, what is the output of the following code:
config(laravolt.avatar.generator)

from avatar.

dieume-n avatar dieume-n commented on June 20, 2024

I'm having the same issue here.

The output of config('laravolt.avatar.generator') in tinker is null

from avatar.

kb6673 avatar kb6673 commented on June 20, 2024

I solved this just like @dieume-n .

Perhaps the documentation should remind us to rebuild the config cache.

from avatar.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.