类别';yii2fullcalendar\models\Event';找不到
我正在尝试使用philippfrenzel/yii2fullcalendar 但我犯了这个错误 PHP致命错误–yii\base\ErrorException 找不到类“类别';yii2fullcalendar\models\Event';找不到,yii2,yii2-extension,Yii2,Yii2 Extension,我正在尝试使用philippfrenzel/yii2fullcalendar 但我犯了这个错误 PHP致命错误–yii\base\ErrorException 找不到类“yii2fullcalendar\models\Event” 我有以下代码: public function actionBooking() { $events = array(); //Testing $Event = new \yii2fullcalendar\models\Event(); $Ev
yii2fullcalendar\models\Event
”
我有以下代码:
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>';
}
公共功能actionBooking()
{
$events=array();
//测试
$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\yii12fullcalendar\modelsEvent();
$Event->id=2;
$Event->title='Testing';
$Event->start=date('Y-m-d\TH:m:s\Z',strottime('明天早上6点');
$events[]=$Event;
?>
您是否遵循中提到的要点?可能在运行php composer.phar之后需要“fxp/composer资产插件:~1.0”
在更新composer.js
时,您应该运行php composer.phar update
以获取yii2fullcalendar。您是否遵循中提到的要点?可能在运行php composer.phar后需要“fxp/composer资产插件:~1.0”
更新了composer.js
,您应该运行php composer.phar update
来获取yii2fullcalendar。