Class not found, but in another project worked

Asked

Viewed 330 times

1

I had already inserted the Class Agent in another project using the Laravel 4, everything was working correctly, but now that I’m trying to put in another project the Laravel is returning the error:

Symfony \ Component \ Debug \ Exception \ FatalErrorException
Class 'Jenssegers\Agent\AgentServiceProvider' not found

It says that you did not find the file being everything correct:

erro

In the archive app/config/app.php, I entered the lines as written in Github... Yet you’re making that mistake. Does anyone know where I might be going wrong?

  • installed by Composer? Did you do this? in app/config/app.php: 'Jenssegers Agent Agentserviceprovider', in app/config/app.php: 'Agent' => 'Jenssegers Agent Facades Agent',

  • @Daniellemes, I entered the files manually and changed the files as written in the GitHub. I did all this and in the cmd I gave one composer update in the project folder...

  • puts "require": { "jenssegers/agent": "*" } into your Composer.json then

  • you can try to give a dump-autoload Composer before

  • @Daniellemes, I put it this way as written in GitHub, better to say, I did everything the same way still it is giving this error.

2 answers

1


Suggestion:

  1. Completely remove the folder vendor/jenssegers

  2. On the command line (cmd), go to the project folder (laravel-master)

  3. Execute the command composer selfupdate to update your commiserate

  4. Execute the command composer require jenssegers/agent

  5. If the above command fails, add "jenssegers/agent": "*" in the section require of your file composer.json, if not already there

  6. Execute the command composer update -o jenssegers/agent

If it still doesn’t work, please include the content of composer.json in your question, to help us in the diagnosis.

-1

Need to give a composer dump-autoload terminal. So it will generate autoload files again.

Browser other questions tagged

You are not signed in. Login or sign up in order to post.