@@ -50,7 +50,7 @@ |
||
| 50 | 50 | ->get()->toArray(); |
| 51 | 51 | if(count($students)>0){ |
| 52 | 52 | array_walk($students,array($this,'process')); |
| 53 | - }else{ |
|
| 53 | + } else{ |
|
| 54 | 54 | echo "all are updated \r\n"; |
| 55 | 55 | } |
| 56 | 56 | } |
@@ -141,7 +141,7 @@ |
||
| 141 | 141 | if(env('APP_ENV') == 'stage'){ |
| 142 | 142 | $query->where('contact_types.contact_option_id', '=', 5) |
| 143 | 143 | ->where('contact_types.name', '=', 'TestEmail'); |
| 144 | - }else{ |
|
| 144 | + } else{ |
|
| 145 | 145 | $query->where('contact_types.contact_option_id', '!=', 5); |
| 146 | 146 | } |
| 147 | 147 | |
@@ -51,16 +51,16 @@ |
||
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | public function delete(){ |
| 54 | - try{ |
|
| 55 | - DB::statement("UPDATE student_guardians t1 |
|
| 54 | + try{ |
|
| 55 | + DB::statement("UPDATE student_guardians t1 |
|
| 56 | 56 | INNER JOIN student_guardians t2 |
| 57 | 57 | set t1.deleted_at=now() |
| 58 | 58 | WHERE |
| 59 | 59 | t1.created < t2.created AND |
| 60 | 60 | t1.student_id = t2.student_id AND |
| 61 | 61 | t1.guardian_id = t1.guardian_id"); |
| 62 | - }catch(\Exception $e){ |
|
| 63 | - dd($e); |
|
| 64 | - } |
|
| 62 | + }catch(\Exception $e){ |
|
| 63 | + dd($e); |
|
| 64 | + } |
|
| 65 | 65 | } |
| 66 | 66 | } |
@@ -59,7 +59,7 @@ |
||
| 59 | 59 | t1.created < t2.created AND |
| 60 | 60 | t1.student_id = t2.student_id AND |
| 61 | 61 | t1.guardian_id = t1.guardian_id"); |
| 62 | - }catch(\Exception $e){ |
|
| 62 | + } catch(\Exception $e){ |
|
| 63 | 63 | dd($e); |
| 64 | 64 | } |
| 65 | 65 | } |