| @@ 85-95 (lines=11) @@ | ||
| 82 | printf($this->GRN.$text.$this->NC); |
|
| 83 | } |
|
| 84 | /* function read CSV file */ |
|
| 85 | protected function readCSV() |
|
| 86 | { |
|
| 87 | $file = fopen(database_path("seeds/".$this->fileName), "r"); |
|
| 88 | $all_data = array(); |
|
| 89 | $row = 1; |
|
| 90 | while(($data = fgetcsv($file, 1000, ",")) !== FALSE){ |
|
| 91 | $all_data[] = ['nama' => $data[0],'nilai' => $data[1],'instansi' => $data[2],'user_id' => $data[3],]; |
|
| 92 | } |
|
| 93 | fclose($file); |
|
| 94 | return $all_data; |
|
| 95 | } |
|
| 96 | } |
|
| 97 | ||
| @@ 88-98 (lines=11) @@ | ||
| 85 | printf($this->GRN.$text.$this->NC); |
|
| 86 | } |
|
| 87 | /* function read CSV file */ |
|
| 88 | protected function readCSV() |
|
| 89 | { |
|
| 90 | $file = fopen(database_path("seeds/".$this->fileName), "r"); |
|
| 91 | $all_data = array(); |
|
| 92 | $row = 1; |
|
| 93 | while(($data = fgetcsv($file, 1000, ",")) !== FALSE){ |
|
| 94 | $all_data[] = ['nomor_un' => $data[0],'user_id' => $data[1],'master_sktm_id' => $data[2],'no_sktm' => $data[3],'nilai' => $data[4],]; |
|
| 95 | } |
|
| 96 | fclose($file); |
|
| 97 | return $all_data; |
|
| 98 | } |
|
| 99 | } |
|
| 100 | ||