DashboardViewsController   A
last analyzed

Complexity

Total Complexity 1

Size/Duplication

Total Lines 54
Duplicated Lines 0 %

Importance

Changes 0
Metric Value
eloc 9
dl 0
loc 54
rs 10
c 0
b 0
f 0
wmc 1

1 Method

Rating   Name   Duplication   Size   Complexity  
A callback() 0 51 1
1
<?php
2
3
namespace App\Http\Controllers;
4
5
use Illuminate\Http\Request;
6
use App\Models\DashboardViews;
7
8
class DashboardViewsController extends Controller
9
{
10
    
11
    public function callback(){
12
        
13
        /** Total number of students by institutions
14
         *  In Grafana query to get total students count 
15
         * `select total from students_count_view  where institution_id = $id`
16
         * `select male from students_count_view  where institution_id = $id`
17
         * `select female from students_count_view  where institution_id = $id`
18
        **/
19
        DashboardViews::createOrUpdateStudentCount();
20
21
        /**
22
         * Student list by institution
23
         * select * from students_list_view where institution_id = $id
24
         */
25
        DashboardViews::createOrUpdateStudentList();
26
27
        /**
28
         * Bulkupload files list
29
         * select * from upload_list_view  where institution_id = $id
30
         */
31
        DashboardViews::createOrUpdateUploadList();
32
33
        /**
34
         * Bulkupload counts
35
         * select * from upload_count_view where institution_id = $id
36
         */
37
        DashboardViews::createOrUpdateUploadCount();
38
39
        /**
40
         * Institution Information
41
         * select * from institution_info_view where institution_id = $id
42
         */
43
        DashboardViews::createOrUpdateInstitutionInfo();
44
45
        /**
46
         * Students count by Grade
47
         * select * from students_count_by_grade_view where institution_id = $id
48
         */
49
        DashboardViews::createOrUpdateStudentsCountByGrade();
50
51
         /**
52
         * Students count by BMI
53
         * select * from students_count_by_bmi_view where institution_id = $id
54
         */
55
        DashboardViews::createOrUpdateStudentCountByBMI();
56
57
        /**
58
         * Students count by Class table
59
         * select * from student_count_by_class_view where institution_id = $id
60
         */
61
        DashboardViews::createOrUpdateStudentCountByClass();
62
    }
63
    
64
}
65