laravel-fullcalendar
laravel-fullcalendar copied to clipboard
Class laravel-fullcalendar does not exist
I followed your docs and got the error Non-static method addevents should not be called statically... Referring to issue #15 I used the Facades Class and it then gives me the error "Class laravel-fullcalendar does not exist" Do you have an advice for that?
Thanks!
if u r using L.5 u should add the
use MaddHatter\LaravelFullcalendar\Facades\Calendar;
or inside ur code use it as \Calendar::xxx();
to call it from the main route.
https://github.com/maddhatter/laravel-fullcalendar/issues/31
I have the same error, but the problem seems to be not fixed.
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
directly, the error it is always there.
I noticed that I started having the same problem with all the new installed packages. I resolved in this way:
-
composer dump-autoload
-
php artisan cache:clear
-
php artisan config:clear