backend/controllers/EventsController.php
/**
     * Lists all Events models.
     * @return mixed
     */
Lists all Events models.
@return mixed
Lists all Events models . @return mixed
public function actionIndex()
    {
        $events =Events::find()->all();
        $tasks = [];
        foreach($events as $ev){
            $event = new \yii2fullcalendar\models\Event();
            $event->id = $ev->id;
            $event->title = $ev->title;
            $event->start =$ev->created_date;
            $tasks[] = $event;
        }
        return $this->render('index', [
            'events' => $tasks,
        ]);
    }
public function actionIndex ( ) { $ events = Events :: find ( ) -> all ( ) ; $ tasks = [ ] ; foreach ( $ events as $ ev ) { $ event = new \ yii2fullcalendar \ models \ Event ( ) ; $ event -> id = $ ev -> id ; $ event -> title = $ ev -> title ; $ event -> start = $ ev -> created_date ; $ tasks [ ] = $ event ; } return $ this -> render ( 'index' , [ 'events' => $ tasks , ] ) ; }
Lists all Events models.
Lists all Events models .
//$searchModel = new EventsSearch();