fxcosta / laravel-chartjs

Simple package to facilitate and automate the use of charts in Laravel 5.x using Chartjs v2 library
486 stars 112 forks source link

Class chartjs does not exist #44

Closed mtshikomba closed 7 years ago

mtshikomba commented 7 years ago

I am trying to create a laravel analytics applications, but after doing all that i was told in the documentation refer to: https://github.com/fxcosta/laravel-chartjs/blob/master/README.md

I am getting the the following error: ReflectionException in Container.php line 749: Class chartsjs does not exist

How do i solve this? Please help!

clnt commented 7 years ago

It sounds like the service provider is not registering correctly, I just got this error and here are the steps I took to fix it:

  1. Make sure package was pulled in by running composer update (are you working from two locations, did you only run it on your project directory?)
  2. Make sure ServiceProvider is added to the config/app.php
  3. composer dump-autoload
  4. php artisan clear-compiled
  5. php artisan cache:clear

Not sure at which point it started working but doesnt hurt to run those commands anyway!

mtshikomba commented 7 years ago

I restarted with the whole process now it works. I don't know what the reason behind the error was. But thanx @CLINT0N for the time and effort!

fxcosta commented 7 years ago

I ll close this issue. If u need, reopen this :-)

mtshikomba commented 7 years ago

Fine, I fixed the error, I thought I did comment?

On May 24, 2017 12:58 AM, "Felix Costa" notifications@github.com wrote:

I ll close this issue. If u need, reopen this :-)

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/fxcosta/laravel-chartjs/issues/44#issuecomment-303567243, or mute the thread https://github.com/notifications/unsubscribe-auth/AKXOOJhwW1vLz9_nQNFv9embLnbdabk5ks5r821DgaJpZM4NQIAh .

cheanizer commented 6 years ago

Using L5.2, still facing same problem after deploy from dev to staging in the same server.
got same error like local.ERROR: ReflectionException: Class chartjs does not exist and I have re-do all reload procedure (composer update,composer dump-autoload,php artisan clear-compiled,php artisan cache:clear) and got same result.

why not using facade?