Completed
Push — master ( bcb82e...80085e )
by vijay
07:39
created
database/migrations/2016_11_30_122809_alter_attachment_table.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -12,7 +12,7 @@  discard block
 block discarded – undo
12 12
      */
13 13
     public function up()
14 14
     {
15
-        Schema::table('ticket_attachment', function (Blueprint $table) {
15
+        Schema::table('ticket_attachment', function(Blueprint $table) {
16 16
             $table->string('driver');
17 17
             $table->string('path');
18 18
         });
@@ -25,7 +25,7 @@  discard block
 block discarded – undo
25 25
      */
26 26
     public function down()
27 27
     {
28
-        Schema::table('ticket_attachment', function (Blueprint $table) {
28
+        Schema::table('ticket_attachment', function(Blueprint $table) {
29 29
             $table->string('driver');
30 30
             $table->string('path');
31 31
         });
Please login to merge, or discard this patch.
app/FaveoStorage/breadcrumbs.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1,6 +1,6 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-Breadcrumbs::register('storage', function ($breadcrumbs) {
3
+Breadcrumbs::register('storage', function($breadcrumbs) {
4 4
     $breadcrumbs->parent('setting');
5 5
     $breadcrumbs->push('Storage', route('storage'));
6 6
 });
Please login to merge, or discard this patch.
app/FaveoStorage/routes.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1,11 +1,11 @@
 block discarded – undo
1 1
 <?php
2 2
 
3
-\Event::listen('settings.system', function () {
3
+\Event::listen('settings.system', function() {
4 4
     $controller = new \App\FaveoStorage\Controllers\SettingsController();
5 5
     echo $controller->settingsIcon();
6 6
 });
7 7
 
8
-Route::group(['middleware'=>['web']], function () {
8
+Route::group(['middleware'=>['web']], function() {
9 9
     Route::get('storage', ['as'=>'storage', 'uses'=>'App\FaveoStorage\Controllers\SettingsController@settings']);
10 10
     Route::post('storage', ['as'=>'post.storage', 'uses'=>'App\FaveoStorage\Controllers\SettingsController@postSettings']);
11 11
     Route::get('attachment', ['as'=>'attach', 'uses'=>'App\FaveoStorage\Controllers\SettingsController@attachment']);
Please login to merge, or discard this patch.
app/Http/Controllers/Api/v1/TicketController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -694,7 +694,7 @@
 block discarded – undo
694 694
             $ticketid = Input::get('ticket_id');
695 695
 
696 696
             $ticket_collaborator = \DB::table('users')
697
-                    ->join('ticket_collaborator', function ($join) use ($ticketid) {
697
+                    ->join('ticket_collaborator', function($join) use ($ticketid) {
698 698
                         $join->on('users.id', '=', 'ticket_collaborator.user_id')
699 699
                         ->where('ticket_collaborator.ticket_id', '=', $ticketid);
700 700
                     })
Please login to merge, or discard this patch.
app/Http/Controllers/Api/v1/ApiController.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -295,7 +295,7 @@  discard block
 block discarded – undo
295 295
             //            $result = $this->model->where('status', '=', 1)->where('isanswered', '=', 0)->where('assigned_to', '=', null)->orderBy('id', 'DESC')->get();
296 296
 //            return response()->json(compact('result'));
297 297
 
298
-            $result = $this->user->join('tickets', function ($join) {
298
+            $result = $this->user->join('tickets', function($join) {
299 299
                 $join->on('users.id', '=', 'tickets.user_id')
300 300
                         ->where('isanswered', '=', 0)->where('status', '=', 1)->whereNull('assigned_to');
301 301
             })
@@ -304,7 +304,7 @@  discard block
 block discarded – undo
304 304
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
305 305
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
306 306
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
307
-                    ->join('ticket_thread', function ($join) {
307
+                    ->join('ticket_thread', function($join) {
308 308
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
309 309
                         ->whereNotNull('title');
310 310
                     })
@@ -341,7 +341,7 @@  discard block
 block discarded – undo
341 341
 //            $result = $this->model->where('assigned_to', '=', null)->where('status', '1')->orderBy('id', 'DESC')->get();
342 342
 //            return response()->json(compact('result'));
343 343
             $user = \JWTAuth::parseToken()->authenticate();
344
-            $unassigned = $this->user->join('tickets', function ($join) {
344
+            $unassigned = $this->user->join('tickets', function($join) {
345 345
                 $join->on('users.id', '=', 'tickets.user_id')
346 346
                         ->whereNull('assigned_to')->where('status', '=', 1);
347 347
             })
@@ -350,12 +350,12 @@  discard block
 block discarded – undo
350 350
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
351 351
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
352 352
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
353
-                    ->join('ticket_thread', function ($join) {
353
+                    ->join('ticket_thread', function($join) {
354 354
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
355 355
                         ->whereNotNull('title');
356 356
                     })
357 357
                     ->select(\DB::raw('max(ticket_thread.updated_at) as updated_at'), 'user_name', 'first_name', 'last_name', 'email', 'profile_pic', 'ticket_number', 'tickets.id', 'title', 'tickets.created_at', 'department.name as department_name', 'ticket_priority.priority as priotity_name', 'sla_plan.name as sla_plan_name', 'help_topic.topic as help_topic_name', 'ticket_status.name as ticket_status_name')
358
-                    ->where(function ($query) use ($user) {
358
+                    ->where(function($query) use ($user) {
359 359
                         if ($user->role != 'admin') {
360 360
                             $query->where('tickets.dept_id', '=', $user->primary_dpt);
361 361
                         }
@@ -391,7 +391,7 @@  discard block
 block discarded – undo
391 391
             //            $result = $this->model->where('status', '>', 1)->where('status', '<', 4)->orderBy('id', 'DESC')->get();
392 392
 //            return response()->json(compact('result'));
393 393
             $user = \JWTAuth::parseToken()->authenticate();
394
-            $result = $this->user->join('tickets', function ($join) {
394
+            $result = $this->user->join('tickets', function($join) {
395 395
                 $join->on('users.id', '=', 'tickets.user_id')
396 396
                         ->where('status', '=', 3)->orWhere('status', '=', 2);
397 397
             })
@@ -400,12 +400,12 @@  discard block
 block discarded – undo
400 400
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
401 401
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
402 402
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
403
-                    ->join('ticket_thread', function ($join) {
403
+                    ->join('ticket_thread', function($join) {
404 404
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
405 405
                         ->whereNotNull('title');
406 406
                     })
407 407
                     ->select(\DB::raw('max(ticket_thread.updated_at) as updated_at'), 'user_name', 'first_name', 'last_name', 'email', 'profile_pic', 'ticket_number', 'tickets.id', 'title', 'tickets.created_at', 'department.name as department_name', 'ticket_priority.priority as priotity_name', 'sla_plan.name as sla_plan_name', 'help_topic.topic as help_topic_name', 'ticket_status.name as ticket_status_name')
408
-                    ->where(function ($query) use ($user) {
408
+                    ->where(function($query) use ($user) {
409 409
                         if ($user->role != 'admin') {
410 410
                             $query->where('tickets.dept_id', '=', $user->primary_dpt);
411 411
                         }
@@ -951,7 +951,7 @@  discard block
 block discarded – undo
951 951
     {
952 952
         try {
953 953
             $user = \JWTAuth::parseToken()->authenticate();
954
-            $inbox = $this->user->join('tickets', function ($join) {
954
+            $inbox = $this->user->join('tickets', function($join) {
955 955
                 $join->on('users.id', '=', 'tickets.user_id')
956 956
                         ->where('status', '=', 1);
957 957
             })
@@ -960,12 +960,12 @@  discard block
 block discarded – undo
960 960
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
961 961
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
962 962
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
963
-                    ->join('ticket_thread', function ($join) {
963
+                    ->join('ticket_thread', function($join) {
964 964
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
965 965
                         ->whereNotNull('ticket_thread.title');
966 966
                     })
967 967
                     ->select(\DB::raw('max(ticket_thread.updated_at) as updated_at'), 'user_name', 'first_name', 'last_name', 'email', 'profile_pic', 'ticket_number', 'tickets.id', 'ticket_thread.title', 'tickets.created_at', 'department.name as department_name', 'ticket_priority.priority as priotity_name', 'sla_plan.name as sla_plan_name', 'help_topic.topic as help_topic_name', 'ticket_status.name as ticket_status_name', 'department.id as department_id', 'users.primary_dpt as user_dpt')
968
-                    ->where(function ($query) use ($user) {
968
+                    ->where(function($query) use ($user) {
969 969
                         if ($user->role != 'admin') {
970 970
                             $query->where('tickets.dept_id', '=', $user->primary_dpt);
971 971
                         }
@@ -1032,7 +1032,7 @@  discard block
 block discarded – undo
1032 1032
     {
1033 1033
         try {
1034 1034
             $user = \JWTAuth::parseToken()->authenticate();
1035
-            $trash = $this->user->join('tickets', function ($join) {
1035
+            $trash = $this->user->join('tickets', function($join) {
1036 1036
                 $join->on('users.id', '=', 'tickets.user_id')
1037 1037
                         ->where('status', '=', 5);
1038 1038
             })
@@ -1041,12 +1041,12 @@  discard block
 block discarded – undo
1041 1041
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
1042 1042
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
1043 1043
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
1044
-                    ->join('ticket_thread', function ($join) {
1044
+                    ->join('ticket_thread', function($join) {
1045 1045
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
1046 1046
                         ->whereNotNull('title');
1047 1047
                     })
1048 1048
                     ->select(\DB::raw('max(ticket_thread.updated_at) as updated_at'), 'user_name', 'first_name', 'last_name', 'email', 'profile_pic', 'ticket_number', 'tickets.id', 'title', 'tickets.created_at', 'department.name as department_name', 'ticket_priority.priority as priotity_name', 'sla_plan.name as sla_plan_name', 'help_topic.topic as help_topic_name', 'ticket_status.name as ticket_status_name')
1049
-                    ->where(function ($query) use ($user) {
1049
+                    ->where(function($query) use ($user) {
1050 1050
                         if ($user->role != 'admin') {
1051 1051
                             $query->where('tickets.dept_id', '=', $user->primary_dpt);
1052 1052
                         }
@@ -1089,7 +1089,7 @@  discard block
 block discarded – undo
1089 1089
                 return response()->json(compact('error'));
1090 1090
             }
1091 1091
             //$user = \JWTAuth::parseToken()->authenticate();
1092
-            $result = $this->user->join('tickets', function ($join) use ($id) {
1092
+            $result = $this->user->join('tickets', function($join) use ($id) {
1093 1093
                 $join->on('users.id', '=', 'tickets.assigned_to')
1094 1094
                         ->where('status', '=', 1);
1095 1095
                         //->where('user_id', '=', $id);
@@ -1099,7 +1099,7 @@  discard block
 block discarded – undo
1099 1099
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
1100 1100
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
1101 1101
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
1102
-                    ->join('ticket_thread', function ($join) {
1102
+                    ->join('ticket_thread', function($join) {
1103 1103
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
1104 1104
                         ->whereNotNull('title');
1105 1105
                     })
@@ -1147,7 +1147,7 @@  discard block
 block discarded – undo
1147 1147
 
1148 1148
                 return response()->json(compact('error'));
1149 1149
             }
1150
-            $result = $this->user->join('tickets', function ($join) use ($id) {
1150
+            $result = $this->user->join('tickets', function($join) use ($id) {
1151 1151
                 $join->on('users.id', '=', 'tickets.user_id')
1152 1152
                         ->where('user_id', '=', $id);
1153 1153
             })
@@ -1156,7 +1156,7 @@  discard block
 block discarded – undo
1156 1156
                     ->join('sla_plan', 'sla_plan.id', '=', 'tickets.sla')
1157 1157
                     ->join('help_topic', 'help_topic.id', '=', 'tickets.help_topic_id')
1158 1158
                     ->join('ticket_status', 'ticket_status.id', '=', 'tickets.status')
1159
-                    ->join('ticket_thread', function ($join) {
1159
+                    ->join('ticket_thread', function($join) {
1160 1160
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
1161 1161
                         ->whereNotNull('title');
1162 1162
                     })
@@ -1199,7 +1199,7 @@  discard block
 block discarded – undo
1199 1199
 
1200 1200
                 return response()->json(compact('error'));
1201 1201
             }
1202
-            $query = $this->user->join('tickets', function ($join) use ($id) {
1202
+            $query = $this->user->join('tickets', function($join) use ($id) {
1203 1203
                 $join->on('users.id', '=', 'tickets.user_id')
1204 1204
                         ->where('tickets.id', '=', $id);
1205 1205
             });
Please login to merge, or discard this patch.
app/Http/Controllers/Common/NotificationController.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -157,11 +157,11 @@
 block discarded – undo
157 157
     public static function getNotifications()
158 158
     {
159 159
         $notifications = UserNotification::with([
160
-                    'notification.type' => function ($query) {
160
+                    'notification.type' => function($query) {
161 161
                         $query->select('id', 'message', 'type');
162
-                    }, 'users' => function ($query) {
162
+                    }, 'users' => function($query) {
163 163
                         $query->select('id', 'email', 'profile_pic');
164
-                    }, 'notification.model' => function ($query) {
164
+                    }, 'notification.model' => function($query) {
165 165
                         $query->select('id', 'ticket_number');
166 166
                     },
167 167
         ])->where('user_id', '=', \Auth::user()->id);
Please login to merge, or discard this patch.
app/Http/Controllers/Common/ExcelController.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
         if (count($data) == 0) {
14 14
             throw new Exception('No data');
15 15
         }
16
-        Excel::create($filename, function ($excel) use ($data) {
17
-            $excel->sheet('sheet', function ($sheet) use ($data) {
16
+        Excel::create($filename, function($excel) use ($data) {
17
+            $excel->sheet('sheet', function($sheet) use ($data) {
18 18
                 $sheet->fromArray($data);
19 19
             });
20 20
         })->export('xls');
Please login to merge, or discard this patch.
app/Http/Controllers/Common/PhpMailController.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -228,7 +228,7 @@
 block discarded – undo
228 228
         //dd($to, $toname, $subject, $data, $cc, $attach);
229 229
         //dd(\Config::get('mail'));
230 230
         //dd($attach);
231
-        $mail = Mail::send('emails.mail', ['data' => $data], function ($m) use ($to, $subject, $toname, $cc, $attach) {
231
+        $mail = Mail::send('emails.mail', ['data' => $data], function($m) use ($to, $subject, $toname, $cc, $attach) {
232 232
             $m->to($to, $toname)->subject($subject);
233 233
 
234 234
             if ($cc != null) {
Please login to merge, or discard this patch.
app/Http/Controllers/Common/ApiSettings.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -80,7 +80,7 @@
 block discarded – undo
80 80
             $ticket = new Tickets();
81 81
             $ticketid = $detail->ticket_id;
82 82
             $data = $ticket
83
-                    ->join('ticket_thread', function ($join) use ($ticketid) {
83
+                    ->join('ticket_thread', function($join) use ($ticketid) {
84 84
                         $join->on('tickets.id', '=', 'ticket_thread.ticket_id')
85 85
                         ->where('ticket_thread.ticket_id', '=', $ticketid);
86 86
                     })
Please login to merge, or discard this patch.