1

I am trying to use philippfrenzel/yii2fullcalendar

But I got this Error

PHP Fatal Error – yii\base\ErrorException Class 'yii2fullcalendar\models\Event' not found

I have the following code:

 public function actionBooking()
{
   $events = array();
   //Testing
   $Event = new \yii2fullcalendar\models\Event();
   $Event->id = 1;
   $Event->title = 'Testing';
   $Event->start = date('Y-m-d\TH:m:s\Z');
   $events[] = $Event;

   $Event = new \yii2fullcalendar\modelsEvent();
   $Event->id = 2;
   $Event->title = 'Testing';
   $Event->start = date('Y-m-d\TH:m:s\Z',strtotime('tomorrow 6am'));
   $events[] = $Event;
 ?>

 <div class="calendar-index">
<?php echo \yii2fullcalendar\yii2fullcalendar::widget(array(
  'events'=> $events,
 ));
 echo '</div>';
}
SiZE
  • 2,217
  • 1
  • 13
  • 24
user5300122
  • 143
  • 4
  • 13
  • Are you following the points mentioned in https://www.youtube.com/watch?v=_jNrPCgwi-8 ? Perhaps after running `php composer.phar require "fxp/composer-asset-plugin:~1.0"` which updates `composer.js`, you should run `php composer.phar update` to get yii2fullcalendar. – maan81 Feb 01 '16 at 05:24

0 Answers0