0

I am using the Fullcalendar package for Laravel 5.

I am experiencing this error:

ReflectionException in Container.php line 734:
Class laravel-fullcalendar does not exist

I have the Service Provider and the Facade in app.php.

This is my controller:

namespace App\Http\Controllers\Admin;

use App\Lesson;
use App\Http\Requests;
use Illuminate\Http\Request;
use App\Http\Controllers\Controller;
use MaddHatter\LaravelFullcalendar\Facades\Calendar;

class CalendarController extends Controller
{
    public function index()
    {
        $calendar_events = Lesson::all();
        return view('admin.calendar', ['calendar' => Calendar::addEvent($calendar_events)]);     
    }
}

I don't understand the reason of this error. I tried to use \Calendar without the "use" line, MaddHatter\LaravelFullcalendar\Facades\Calendar::addEvent() directly and I tried several times composer dump-autoload.

J03Bukowski
  • 102
  • 3
  • 19

1 Answers1

0

I noticed that I started having the same problem with all the new installed packages. I resolved in this way:

  1. composer dump-autoload
  2. php artisan cache:clear
  3. php artisan config:clear
J03Bukowski
  • 102
  • 3
  • 19