public function actionDashboardLog()
    {
        $data = Log::find()->orderBy(['timestamp' => SORT_DESC])->with(['user'])->limit(60)->all();
        $log= [];
        foreach ($data as $item) {
            $log[strtotime('today', $item->timestamp)][] = $item;
        }
        
        $array = [];
        
        krsort($log, SORT_NUMERIC);
        
        foreach ($log as $day => $values) {
            $array[] = [
                'day' => $day,
                'items' => $values,
            ];
        }
        
        return $array;
    }
public function actionDashboardLog()
    {
        $data = Log::find()->orderBy(['timestamp' => SORT_DESC])->with(['user'])->limit(60)->all();
        $log= [];
        foreach ($data as $item) {
            $log[strtotime('today', $item->timestamp)][] = $item;
        }
        
        $array = [];
        
        krsort($log, SORT_NUMERIC);
        
        foreach ($log as $day => $values) {
            $array[] = [
                'day' => $day,
                'items' => $values,
            ];
        }
        
        return $array;
    }
public function actionDashboardLog ( ) { $ data = Log :: find ( ) -> orderBy ( [ 'timestamp' => SORT_DESC ] ) -> with ( [ 'user' ] ) -> limit ( 60 ) -> all ( ) ; $ log = [ ] ; foreach ( $ data as $ item ) { $ log [ strtotime ( 'today' , $ item -> timestamp ) ] [ ] = $ item ; } $ array = [ ] ; krsort ( $ log , SORT_NUMERIC ) ; foreach ( $ log as $ day => $ values ) { $ array [ ] = [ 'day' => $ day , 'items' => $ values , ] ; } return $ array ; }
Get all logs for the cms in order to render the dashboard

@return array
Get all logs for the cms in order to render the dashboard