Test Setup Failed
Push — master ( 93675a...ba3342 )
by Mohamed
14:07 queued 12s
created

ExaminationStudentsExport   A

Complexity

Total Complexity 2

Size/Duplication

Total Lines 32
Duplicated Lines 0 %

Importance

Changes 1
Bugs 0 Features 0
Metric Value
eloc 19
dl 0
loc 32
rs 10
c 1
b 0
f 0
wmc 2

2 Methods

Rating   Name   Duplication   Size   Complexity  
A headings() 0 19 1
A collection() 0 4 1
1
<?php
2
3
namespace App\Exports;
4
5
use Maatwebsite\Excel\Concerns\FromCollection;
6
use App\Models\Examination_student;
7
use Maatwebsite\Excel\Concerns\WithHeadings;
8
9
class ExaminationStudentsExport implements FromCollection , WithHeadings
10
{
11
12
    public function headings(): array
13
    {
14
        return [
15
            'st_no',
16
            'stu_no',
17
            'nsid',
18
            'schoolid',
19
            'f_name',
20
            'medium',
21
            'b_date',
22
            'gender',
23
            'pvt_address',
24
            'a_income',
25
            'spl_need',
26
            'disability_type',
27
            'disability',
28
            'sp_center',
29
            'created_at',
30
            'updated_at'
31
        ];
32
    }
33
    
34
    /**
35
    * @return \Illuminate\Support\Collection
36
    */
37
    public function collection()
38
    {
39
        //
40
        return Examination_student::all();
41
    }
42
}
43