Completed
Push — master ( bcb82e...80085e )
by vijay
07:39
created
app/Http/Controllers/Common/SettingsController.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -59,16 +59,16 @@  discard block
 block discarded – undo
59 59
         return \Datatable::collection(Widgets::where('id', '<', '7')->get())
60 60
                         ->searchColumns('name')
61 61
                         ->orderColumns('name', 'title', 'value')
62
-                        ->addColumn('name', function ($model) {
62
+                        ->addColumn('name', function($model) {
63 63
                             return $model->name;
64 64
                         })
65
-                        ->addColumn('title', function ($model) {
65
+                        ->addColumn('title', function($model) {
66 66
                             return $model->title;
67 67
                         })
68
-                        ->addColumn('body', function ($model) {
68
+                        ->addColumn('body', function($model) {
69 69
                             return $model->value;
70 70
                         })
71
-                        ->addColumn('Actions', function ($model) {
71
+                        ->addColumn('Actions', function($model) {
72 72
                             return '<span data-toggle="modal" data-target="#edit_widget'.$model->id.'"><a class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a></span>
73 73
                 <div class="modal fade" id="edit_widget'.$model->id.'">
74 74
                     <div class="modal-dialog">
@@ -148,13 +148,13 @@  discard block
 block discarded – undo
148 148
         return \Datatable::collection(Widgets::where('id', '>', '6')->get())
149 149
                         ->searchColumns('name')
150 150
                         ->orderColumns('name', 'value')
151
-                        ->addColumn('name', function ($model) {
151
+                        ->addColumn('name', function($model) {
152 152
                             return $model->name;
153 153
                         })
154
-                        ->addColumn('link', function ($model) {
154
+                        ->addColumn('link', function($model) {
155 155
                             return $model->value;
156 156
                         })
157
-                        ->addColumn('Actions', function ($model) {
157
+                        ->addColumn('Actions', function($model) {
158 158
                             return '<span data-toggle="modal" data-target="#edit_widget'.$model->id.'"><a class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a></span>
159 159
                 <div class="modal fade" id="edit_widget'.$model->id.'">
160 160
                     <div class="modal-dialog">
@@ -288,7 +288,7 @@  discard block
 block discarded – undo
288 288
 
289 289
         return \Datatable::collection(new Collection($plugins))
290 290
                         ->searchColumns('name')
291
-                        ->addColumn('name', function ($model) {
291
+                        ->addColumn('name', function($model) {
292 292
                             if (array_has($model, 'path')) {
293 293
                                 if ($model['status'] == 0) {
294 294
                                     $activate = '<a href='.url('plugin/status/'.$model['path']).'>Activate</a>';
@@ -324,16 +324,16 @@  discard block
 block discarded – undo
324 324
 
325 325
                             return ucfirst($model['name']).$action;
326 326
                         })
327
-                        ->addColumn('description', function ($model) {
327
+                        ->addColumn('description', function($model) {
328 328
                             return ucfirst($model['description']);
329 329
                         })
330
-                        ->addColumn('author', function ($model) {
330
+                        ->addColumn('author', function($model) {
331 331
                             return ucfirst($model['author']);
332 332
                         })
333
-                        ->addColumn('website', function ($model) {
333
+                        ->addColumn('website', function($model) {
334 334
                             return '<a href='.$model['website'].' target=_blank>'.$model['website'].'</a>';
335 335
                         })
336
-                        ->addColumn('version', function ($model) {
336
+                        ->addColumn('version', function($model) {
337 337
                             return $model['version'];
338 338
                         })
339 339
                         ->make();
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/helpdesk/PriorityController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -79,10 +79,10 @@  discard block
 block discarded – undo
79 79
 
80 80
             return \Datatable::Collection($tickets)
81 81
                             ->showColumns('priority', 'priority_desc')
82
-                            ->addColumn('priority_color', function ($model) {
82
+                            ->addColumn('priority_color', function($model) {
83 83
                                 return "<button class='btn' style = 'background-color:$model->priority_color'></button>";
84 84
                             })
85
-                            ->addColumn('status', function ($model) {
85
+                            ->addColumn('status', function($model) {
86 86
                                 if ($model->status == 1) {
87 87
                                     return "<a style='color:green'>active</a>";
88 88
                                 } elseif ($model->status == 0) {
@@ -92,7 +92,7 @@  discard block
 block discarded – undo
92 92
                                     return "<a style='color:red'>inactive</a>";
93 93
                                 }
94 94
                             })
95
-                            ->addColumn('action', function ($model) {
95
+                            ->addColumn('action', function($model) {
96 96
                                 if ($model->is_default > 0) {
97 97
                                     return '<a href='.url('ticket/priority/'.$model->priority_id.'/edit')." class='btn btn-info btn-xs' disabled='disabled'>Edit</a>&nbsp;<a href=".url('ticket/priority/'.$model->priority_id.'/destroy')." class='btn btn-warning btn-info btn-xs' disabled='disabled' > delete </a>";
98 98
                                 } else {
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/helpdesk/EmailsController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -507,14 +507,14 @@
 block discarded – undo
507 507
         if ($request->input('sending_protocol') == 'smtp') {
508 508
             $mail = new \PHPMailer();
509 509
             $mail->isSMTP();
510
-            $mail->Host = $request->input('sending_host');            // Specify main and backup SMTP servers
510
+            $mail->Host = $request->input('sending_host'); // Specify main and backup SMTP servers
511 511
             //$mail->SMTPAuth = true;                                   // Enable SMTP authentication
512
-            $mail->Username = $request->input('email_address');       // SMTP username
513
-            $mail->Password = $request->input('password');            // SMTP password
512
+            $mail->Username = $request->input('email_address'); // SMTP username
513
+            $mail->Password = $request->input('password'); // SMTP password
514 514
             $mail->SMTPSecure = $request->input('sending_encryption'); // Enable TLS encryption, `ssl` also accepted
515
-            $mail->Port = $request->input('sending_port');            // TCP port to connect to
515
+            $mail->Port = $request->input('sending_port'); // TCP port to connect to
516 516
             if (!$request->input('smtp_validate')) {
517
-                $mail->SMTPAuth = true;                               // Enable SMTP authentication
517
+                $mail->SMTPAuth = true; // Enable SMTP authentication
518 518
                 $mail->SMTPOptions = [
519 519
                     'ssl' => [
520 520
                         'verify_peer'       => false,
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/helpdesk/TeamController.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -155,13 +155,13 @@  discard block
 block discarded – undo
155 155
             return \Datatable::query($users)
156 156
             ->showColumns('user_name')
157 157
 
158
-            ->addColumn('first_name', function ($model) {
158
+            ->addColumn('first_name', function($model) {
159 159
                 $full_name = ucfirst($model->first_name).' '.ucfirst($model->last_name);
160 160
 
161 161
                 return $full_name;
162 162
             })
163 163
 
164
-            ->addColumn('active', function ($model) {
164
+            ->addColumn('active', function($model) {
165 165
                 if ($model->active == '1') {
166 166
                     $role = "<a class='btn btn-success btn-xs'>".'Active'.'</a>';
167 167
                 } elseif ($model->active == 'agent') {
@@ -171,17 +171,17 @@  discard block
 block discarded – undo
171 171
                 return $role;
172 172
             })
173 173
 
174
-            ->addColumn('assign_group', function ($model) {
174
+            ->addColumn('assign_group', function($model) {
175 175
                 $group = Groups::whereId($model->assign_group)->first();
176 176
 
177 177
                 return $group->name;
178 178
             })
179
-            ->addColumn('primary_dpt', function ($model) {
179
+            ->addColumn('primary_dpt', function($model) {
180 180
                 $dept = Department::whereId($model->primary_dpt)->first();
181 181
 
182 182
                 return $dept->name;
183 183
             })
184
-            ->addColumn('role', function ($model) {
184
+            ->addColumn('role', function($model) {
185 185
                 if ($model->role == 'admin') {
186 186
                     $role = "<a class='btn btn-success btn-xs'>".$model->role.'</a>';
187 187
                 } elseif ($model->role == 'agent') {
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/helpdesk/LanguageController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -82,27 +82,27 @@  discard block
 block discarded – undo
82 82
     public function getLanguages()
83 83
     {
84 84
         $path = base_path('resources/lang');
85
-        $values = scandir($path);  //Extracts names of directories present in lang directory
85
+        $values = scandir($path); //Extracts names of directories present in lang directory
86 86
         $values = array_slice($values, 2); // skips array element $value[0] = '.' & $value[1] = '..'
87 87
         return \Datatable::collection(new Collection($values))
88
-                        ->addColumn('language', function ($model) {
88
+                        ->addColumn('language', function($model) {
89 89
                             if ($model == Config::get('app.fallback_locale')) {
90 90
                                 return Config::get('languages.'.$model).' ('.Lang::get('lang.default').')';
91 91
                             } else {
92 92
                                 return Config::get('languages.'.$model);
93 93
                             }
94 94
                         })
95
-                        ->addColumn('id', function ($model) {
95
+                        ->addColumn('id', function($model) {
96 96
                             return $model;
97 97
                         })
98
-                        ->addColumn('status', function ($model) {
98
+                        ->addColumn('status', function($model) {
99 99
                             if (Lang::getLocale() === $model) {
100 100
                                 return "<span style='color:green'>".Lang::trans('lang.active').'</span>';
101 101
                             } else {
102 102
                                 return "<span style='color:red'>".Lang::trans('lang.inactive').'</span>';
103 103
                             }
104 104
                         })
105
-                        ->addColumn('Action', function ($model) {
105
+                        ->addColumn('Action', function($model) {
106 106
                             if (Lang::getLocale() === $model) {
107 107
                                 return "<a href='change-language/".$model."'><input type='button' class='btn btn-info btn-xs btn-flat' disabled value='".Lang::trans('lang.disable')."'/></a>  
108 108
                 <a href='change-language/".$model."' class='btn btn-danger btn-xs btn-flat' disabled><i class='fa fa-trash' style='color:black;'> </i> ".Lang::trans('lang.delete').'</a>';
@@ -227,7 +227,7 @@  discard block
 block discarded – undo
227 227
     {
228 228
         if ($lang !== App::getLocale()) {
229 229
             if ($lang !== Config::get('app.fallback_locale')) {
230
-                $deletePath = base_path('resources/lang').'/'.$lang;     //define file path to delete
230
+                $deletePath = base_path('resources/lang').'/'.$lang; //define file path to delete
231 231
                 $success = File::deleteDirectory($deletePath); //remove extracted folder and it's subfolder from lang
232 232
                 if ($success) {
233 233
                     //sending back with success message
Please login to merge, or discard this patch.
app/Http/Controllers/Admin/helpdesk/WorkflowController.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -79,11 +79,11 @@  discard block
 block discarded – undo
79 79
                         /* order column name and description */
80 80
                         ->orderColumns('name')
81 81
                         /* add column name */
82
-                        ->addColumn('name', function ($model) {
82
+                        ->addColumn('name', function($model) {
83 83
                             return $model->name;
84 84
                         })
85 85
                         /* add column status */
86
-                        ->addColumn('status', function ($model) {
86
+                        ->addColumn('status', function($model) {
87 87
                             if ($model->status == 1) {
88 88
                                 return 'Active';
89 89
                             } elseif ($model->status == 0) {
@@ -91,17 +91,17 @@  discard block
 block discarded – undo
91 91
                             }
92 92
                         })
93 93
                         /* add column order */
94
-                        ->addColumn('order', function ($model) {
94
+                        ->addColumn('order', function($model) {
95 95
                             return $model->order;
96 96
                         })
97 97
                         /* add column rules */
98
-                        ->addColumn('rules', function ($model) {
98
+                        ->addColumn('rules', function($model) {
99 99
                             $rules = WorkflowRules::where('workflow_id', '=', $model->id)->count();
100 100
 
101 101
                             return $rules;
102 102
                         })
103 103
                         /* add column target */
104
-                        ->addColumn('target', function ($model) {
104
+                        ->addColumn('target', function($model) {
105 105
                             $target = $model->target;
106 106
                             $target1 = explode('-', $target);
107 107
                             if ($target1[0] == 'A') {
@@ -121,15 +121,15 @@  discard block
 block discarded – undo
121 121
                             }
122 122
                         })
123 123
                         /* add column created */
124
-                        ->addColumn('Created', function ($model) {
124
+                        ->addColumn('Created', function($model) {
125 125
                             return TicketController::usertimezone($model->created_at);
126 126
                         })
127 127
                         /* add column updated */
128
-                        ->addColumn('Updated', function ($model) {
128
+                        ->addColumn('Updated', function($model) {
129 129
                             return TicketController::usertimezone($model->updated_at);
130 130
                         })
131 131
                         /* add column action */
132
-                        ->addColumn('Actions', function ($model) {
132
+                        ->addColumn('Actions', function($model) {
133 133
                             $confirmation = 'Are you sure?';
134 134
 
135 135
                             return "<a class='btn btn-info btn-xs btn-flat' href='".route('workflow.edit', $model->id)."'><i class='fa fa-edit text-black'></i> Edit</a>  <a class='btn btn-danger btn-xs btn-flat' href='".route('workflow.delete', $model->id)."'><i class='fa fa-trash text-black'></i> Delete</a>";
Please login to merge, or discard this patch.
app/Http/Controllers/Auth/UserController.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -81,15 +81,15 @@  discard block
 block discarded – undo
81 81
         return \Datatable::collection(User::where('role', '!=', 'admin')->where('role', '!=', 'agent')->get())
82 82
                         ->searchColumns('user_name')
83 83
                         ->orderColumns('user_name', 'email')
84
-                        ->addColumn('user_name', function ($model) {
84
+                        ->addColumn('user_name', function($model) {
85 85
                             return $model->user_name;
86 86
                         })
87
-                        ->addColumn('email', function ($model) {
87
+                        ->addColumn('email', function($model) {
88 88
                             $email = $model->email;
89 89
 
90 90
                             return $email;
91 91
                         })
92
-                        ->addColumn('phone', function ($model) {
92
+                        ->addColumn('phone', function($model) {
93 93
                             $phone = '';
94 94
                             if ($model->phone_number) {
95 95
                                 $phone = $model->ext.' '.$model->phone_number;
@@ -102,7 +102,7 @@  discard block
 block discarded – undo
102 102
 
103 103
                             return $phone;
104 104
                         })
105
-                        ->addColumn('status', function ($model) {
105
+                        ->addColumn('status', function($model) {
106 106
                             $status = $model->active;
107 107
                             if ($status == 1) {
108 108
                                 $stat = '<button class="btn btn-success btn-xs">Active</button>';
@@ -112,12 +112,12 @@  discard block
 block discarded – undo
112 112
 
113 113
                             return $stat;
114 114
                         })
115
-                        ->addColumn('lastlogin', function ($model) {
115
+                        ->addColumn('lastlogin', function($model) {
116 116
                             $t = $model->updated_at;
117 117
 
118 118
                             return TicketController::usertimezone($t);
119 119
                         })
120
-                        ->addColumn('Actions', function ($model) {
120
+                        ->addColumn('Actions', function($model) {
121 121
                             //return '<a href=article/delete/ ' . $model->id . ' class="btn btn-danger btn-flat" onclick="myFunction()">Delete</a>&nbsp;<a href=article/' . $model->id . '/edit class="btn btn-warning btn-flat">Edit</a>&nbsp;<a href=show/' . $model->id . ' class="btn btn-warning btn-flat">View</a>';
122 122
                             //return '<form action="article/delete/ ' . $model->id . '" method="post" onclick="alert()"><button type="sumbit" value="Delete"></button></form><a href=article/' . $model->id . '/edit class="btn btn-warning btn-flat">Edit</a>&nbsp;<a href=show/' . $model->id . ' class="btn btn-warning btn-flat">View</a>';
123 123
                             return '<span  data-toggle="modal" data-target="#deletearticle'.$model->id.'"><a href="#" ><button class="btn btn-danger btn-xs"></a> '.\Lang::get('lang.delete').' </button></span>&nbsp;<a href="'.route('user.edit', $model->id).'" class="btn btn-warning btn-xs">'.\Lang::get('lang.edit').'</a>&nbsp;<a href="'.route('user.show', $model->id).'" class="btn btn-primary btn-xs">'.\Lang::get('lang.view').'</a>
Please login to merge, or discard this patch.
app/Http/Controllers/Client/kb/UserController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -205,7 +205,7 @@
 block discarded – undo
205 205
         $details = $request->input('message');
206 206
         //echo $message;
207 207
         //echo $contact->email;
208
-        $mail = Mail::send('themes.default1.client.kb.article-list.contact-details', ['name' => $name, 'email' => $email, 'subject' => $subject, 'details' => $details], function ($message) use ($contact) {
208
+        $mail = Mail::send('themes.default1.client.kb.article-list.contact-details', ['name' => $name, 'email' => $email, 'subject' => $subject, 'details' => $details], function($message) use ($contact) {
209 209
             $message->to($contact->email, $contact->name)->subject('Contact');
210 210
         });
211 211
         if ($mail) {
Please login to merge, or discard this patch.
app/Http/Controllers/Client/helpdesk/FormController.php 1 patch
Spacing   +10 added lines, -10 removed lines patch added patch discarded remove patch
@@ -104,29 +104,29 @@  discard block
 block discarded – undo
104 104
                         $form_fields = explode(',', $form_data->value);
105 105
                         $var = '';
106 106
                         foreach ($form_fields as $form_field) {
107
-                            $var .= '<option value="' . $form_field . '">' . $form_field . '</option>';
107
+                            $var .= '<option value="'.$form_field.'">'.$form_field.'</option>';
108 108
                         }
109
-                        echo '<br/><label>' . ucfirst($form_data->label) . '</label><select class="form-control" name="' . $form_data->name . '">' . $var . '</select>';
109
+                        echo '<br/><label>'.ucfirst($form_data->label).'</label><select class="form-control" name="'.$form_data->name.'">'.$var.'</select>';
110 110
                     } elseif ($form_data->type == 'radio') {
111 111
                         $type2 = $form_data->value;
112 112
                         $vals = explode(',', $type2);
113
-                        echo '<br/><label>' . ucfirst($form_data->label) . '</label><br/>';
113
+                        echo '<br/><label>'.ucfirst($form_data->label).'</label><br/>';
114 114
                         foreach ($vals as $val) {
115
-                            echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '"> ' . $form_data->value . '&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
115
+                            echo '<input type="'.$form_data->type.'" name="'.$form_data->name.'"> '.$form_data->value.'&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;';
116 116
                         }
117 117
                         echo '<br/>';
118 118
                     } elseif ($form_data->type == 'textarea') {
119 119
                         $type3 = $form_data->value;
120
-                        echo '<br/><label>' . $form_data->label . '</label></br><textarea id="unique-textarea" name="' . $form_data->name . '" class="form-control" style="height:15%;"></textarea>';
120
+                        echo '<br/><label>'.$form_data->label.'</label></br><textarea id="unique-textarea" name="'.$form_data->name.'" class="form-control" style="height:15%;"></textarea>';
121 121
                     } elseif ($form_data->type == 'checkbox') {
122 122
                         $type4 = $form_data->value;
123 123
                         $checks = explode(',', $type4);
124
-                        echo '<br/><label>' . ucfirst($form_data->label) . '</label><br/>';
124
+                        echo '<br/><label>'.ucfirst($form_data->label).'</label><br/>';
125 125
                         foreach ($checks as $check) {
126
-                            echo '<input type="' . $form_data->type . '" name="' . $form_data->name . '">&nbsp&nbsp' . $check;
126
+                            echo '<input type="'.$form_data->type.'" name="'.$form_data->name.'">&nbsp&nbsp'.$check;
127 127
                         }
128 128
                     } else {
129
-                        echo '<br/><label>' . ucfirst($form_data->label) . '</label><input type="' . $form_data->type . '" class="form-control"   name="' . $form_data->name . '" />';
129
+                        echo '<br/><label>'.ucfirst($form_data->label).'</label><input type="'.$form_data->type.'" class="form-control"   name="'.$form_data->name.'" />';
130 130
                     }
131 131
                 }
132 132
                 echo '<br/><br/>';
@@ -238,7 +238,7 @@  discard block
 block discarded – undo
238 238
                     }
239 239
                 }
240 240
                 // dd($result);
241
-                return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is') . ' ' . $result[0] . '. ' . Lang::get('lang.Please-save-this-for-future-reference'));
241
+                return Redirect::back()->with('success', Lang::get('lang.Ticket-has-been-created-successfully-your-ticket-number-is').' '.$result[0].'. '.Lang::get('lang.Please-save-this-for-future-reference'));
242 242
             } else {
243 243
                 return Redirect::back()->withInput($request->except('password'))->with('fails', Lang::get('lang.failed-to-create-user-tcket-as-mobile-has-been-taken'));
244 244
             }
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
                 $tickets = Tickets::where('id', '=', $id)->first();
262 262
                 $thread = Ticket_Thread::where('ticket_id', '=', $tickets->id)->first();
263 263
 
264
-                $subject = $thread->title . '[#' . $tickets->ticket_number . ']';
264
+                $subject = $thread->title.'[#'.$tickets->ticket_number.']';
265 265
                 $body = $request->input('comment');
266 266
 
267 267
                 $user_cred = User::where('id', '=', $tickets->user_id)->first();
Please login to merge, or discard this patch.