backend/controllers/LogsController.php
/**
     * Lists all Logs models.
     * @return mixed
     */
Lists all Logs models.
@return mixed
Lists all Logs models . @return mixed
public function actionIndex ($begin=null,$end=null)
    {   
        $model=new Logs();
        $tableName=  Logs::tableName();
        foreach ($this->project_ends['sm'] as $path){
            $propath=$this->paths.'\\'.$path;
            $repo=new Git($propath);
            $res=$repo->getlogs($begin,$end,$path);
            if($res!=false){
                $files[]=$res;
            }   
        }
       foreach ($files as $f){
            foreach ($f as $val){
                echo $val['tag'].$val['commit'].substr($val['starttime'], 0,20)."</br>";
            }
        }
exit;
    }
public function actionIndex ( $ begin = null , $ end = null ) { $ model = new Logs ( ) ; $ tableName = Logs :: tableName ( ) ; foreach ( $ this -> project_ends [ 'sm' ] as $ path ) { $ propath = $ this -> paths . '\\' . $ path ; $ repo = new Git ( $ propath ) ; $ res = $ repo -> getlogs ( $ begin , $ end , $ path ) ; if ( $ res != false ) { $ files [ ] = $ res ; } } foreach ( $ files as $ f ) { foreach ( $ f as $ val ) { echo $ val [ 'tag' ] . $ val [ 'commit' ] . substr ( $ val [ 'starttime' ] , 0 , 20 ) . " </br> " ; } } exit ; }
Lists all Logs models.
Lists all Logs models .
//var_dump($val); //                 $model->tag=$val['tag']; //                 $model->hash=$val['hash']; //                 $model->commit=$val['commit']; //                 $model->starttime=substr($val['starttime'], 0,20); //                 $model->merge=$val['merge']; //echo $val['tag']."</br>"; //echo $val['commit']."</br>"; //echo substr($val['starttime'], 0,20)."</br>"; //         $searchModel = new LogsSearch(); //         $dataProvider = $searchModel->search(Yii::$app->request->queryParams); //         return $this->render('index', [ //             'searchModel' => $searchModel, //             'dataProvider' => $dataProvider, //         ]);