@@ -86,11 +86,11 @@ |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | public function process($students,$count,$type){ |
| 89 | - if($type === 'duplicate'){ |
|
| 89 | + if($type === 'duplicate'){ |
|
| 90 | 90 | array_walk($students,array($this,'cleanData')); |
| 91 | - }elseif($type === 'lock'){ |
|
| 91 | + }elseif($type === 'lock'){ |
|
| 92 | 92 | array_walk($students,array($this,'lockData')); |
| 93 | - } |
|
| 93 | + } |
|
| 94 | 94 | } |
| 95 | 95 | |
| 96 | 96 | public function lockData($Student){ |
@@ -164,7 +164,7 @@ |
||
| 164 | 164 | if(!empty($row['admission_no'])){ |
| 165 | 165 | Institution_student::where('student_id','=',$studentInfo->id) |
| 166 | 166 | ->where('institution_id','=', $institution) |
| 167 | - // ->where('academic_period_id','=',$academicPeriod->id) |
|
| 167 | + // ->where('academic_period_id','=',$academicPeriod->id) |
|
| 168 | 168 | ->update(['admission_id'=> $row['admission_no']]); |
| 169 | 169 | } |
| 170 | 170 | if (!empty($row['special_need'])) { |
@@ -52,16 +52,16 @@ |
||
| 52 | 52 | } |
| 53 | 53 | |
| 54 | 54 | public function delete(){ |
| 55 | - try{ |
|
| 56 | - DB::statement("UPDATE student_guardians t1 |
|
| 55 | + try{ |
|
| 56 | + DB::statement("UPDATE student_guardians t1 |
|
| 57 | 57 | INNER JOIN student_guardians t2 |
| 58 | 58 | set t1.deleted_at=now() |
| 59 | 59 | WHERE |
| 60 | 60 | t1.id > t2.id AND |
| 61 | 61 | t1.student_id = t2.student_id AND |
| 62 | 62 | t1.guardian_id = t2.guardian_id"); |
| 63 | - }catch(\Exception $e){ |
|
| 64 | - dd($e); |
|
| 65 | - } |
|
| 63 | + }catch(\Exception $e){ |
|
| 64 | + dd($e); |
|
| 65 | + } |
|
| 66 | 66 | } |
| 67 | 67 | } |
@@ -41,7 +41,7 @@ |
||
| 41 | 41 | public function array_walk($shift, $count, $params) |
| 42 | 42 | { |
| 43 | 43 | try{ |
| 44 | - DB::beginTransaction(); |
|
| 44 | + DB::beginTransaction(); |
|
| 45 | 45 | array_walk($shift, array($this, 'process'), $params); |
| 46 | 46 | DB::commit(); |
| 47 | 47 | }catch(\Exception $e){ |
@@ -74,7 +74,7 @@ discard block |
||
| 74 | 74 | |
| 75 | 75 | public function process($student) |
| 76 | 76 | { |
| 77 | - try{ |
|
| 77 | + try{ |
|
| 78 | 78 | $wrongStudentsClass = Institution_class_student::where('institution_id', $student['institution_id']) |
| 79 | 79 | ->whereRaw('institution_class_id not in (select id from institution_classes where institution_id ='.$student['institution_id'].' )') |
| 80 | 80 | ->orWhere('institution_class_id', 0) |
@@ -143,8 +143,8 @@ discard block |
||
| 143 | 143 | $this->output->writeln("student record :".$student['student_id'] ); |
| 144 | 144 | } |
| 145 | 145 | } |
| 146 | - }catch(\Exception $e){ |
|
| 146 | + }catch(\Exception $e){ |
|
| 147 | 147 | dd($e); |
| 148 | - } |
|
| 148 | + } |
|
| 149 | 149 | } |
| 150 | 150 | } |
@@ -254,7 +254,7 @@ discard block |
||
| 254 | 254 | protected function ValidateIdentity($attribute, $value, $perameters, $validator) |
| 255 | 255 | |
| 256 | 256 | { |
| 257 | - // dd($value); |
|
| 257 | + // dd($value); |
|
| 258 | 258 | |
| 259 | 259 | foreach ($validator->getData() as $data) { |
| 260 | 260 | |
@@ -263,16 +263,16 @@ discard block |
||
| 263 | 263 | { |
| 264 | 264 | //dd(true); |
| 265 | 265 | |
| 266 | - if(!strcmp($data['identity_type'],"BC")) |
|
| 267 | - { |
|
| 266 | + if(!strcmp($data['identity_type'],"BC")) |
|
| 267 | + { |
|
| 268 | 268 | $out = 1; |
| 269 | - } |
|
| 270 | - else |
|
| 271 | - { |
|
| 272 | - $out = 2; |
|
| 273 | - } |
|
| 269 | + } |
|
| 270 | + else |
|
| 271 | + { |
|
| 272 | + $out = 2; |
|
| 273 | + } |
|
| 274 | 274 | |
| 275 | - if(($out == 1)&&(preg_match('/^[0-9]{4}+$/',$value))) |
|
| 275 | + if(($out == 1)&&(preg_match('/^[0-9]{4}+$/',$value))) |
|
| 276 | 276 | { |
| 277 | 277 | //dd(true); |
| 278 | 278 | return true; |
@@ -280,7 +280,7 @@ discard block |
||
| 280 | 280 | } |
| 281 | 281 | |
| 282 | 282 | elseif (($out == 2) &&(preg_match('/^[0-9]{9}[VX]{1}+$/',$value))) |
| 283 | - { |
|
| 283 | + { |
|
| 284 | 284 | return true; |
| 285 | 285 | } |
| 286 | 286 | elseif (($out == 2) && (preg_match('/^[0-9]{12}+$/',$value))) |
@@ -288,7 +288,7 @@ discard block |
||
| 288 | 288 | return true; |
| 289 | 289 | } |
| 290 | 290 | else { |
| 291 | - //dd(false); |
|
| 291 | + //dd(false); |
|
| 292 | 292 | $this ->_custom_messages['unmatch'] = $attribute." format does not match with Identity type"; |
| 293 | 293 | $this->_set_custom_stuff(); |
| 294 | 294 | return false; |
@@ -307,7 +307,7 @@ discard block |
||
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | elseif (preg_match('/^[0-9]{9}[VX]{1}+$/',$value)) |
| 310 | - { |
|
| 310 | + { |
|
| 311 | 311 | return true; |
| 312 | 312 | } |
| 313 | 313 | elseif (preg_match('/^[0-9]{12}+$/',$value)) |
@@ -25,11 +25,11 @@ |
||
| 25 | 25 | * |
| 26 | 26 | * @return void |
| 27 | 27 | */ |
| 28 | - public function boot() |
|
| 29 | - { |
|
| 30 | - // |
|
| 31 | - if(!(\App::environment('local'))) { |
|
| 32 | - URL::forceScheme('https'); |
|
| 33 | - } |
|
| 34 | - } |
|
| 28 | + public function boot() |
|
| 29 | + { |
|
| 30 | + // |
|
| 31 | + if(!(\App::environment('local'))) { |
|
| 32 | + URL::forceScheme('https'); |
|
| 33 | + } |
|
| 34 | + } |
|
| 35 | 35 | } |