1

我正在尝试使用philippfrenzel/yii2fullcalendar

但我得到了这个错误

PHP 致命错误 – yii\base\ErrorException Class ' yii2fullcalendar\models\Event' not found

我有以下代码:

 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>';
}
4

0 回答 0