Completed
Push — development ( d5f549...e7964c )
by Ashutosh
09:05
created
app/Http/Controllers/Common/TemplateController.php 2 patches
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -127,9 +127,9 @@  discard block
 block discarded – undo
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
131
-                             return $model->name;
132
-                         })
130
+                            ->addColumn('name', function ($model) {
131
+                                return $model->name;
132
+                            })
133 133
                         ->addColumn('type', function ($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
@@ -273,7 +273,7 @@  discard block
 block discarded – undo
273 273
     }
274 274
 
275 275
     public function mailing($from, $to, $data, $subject, $replace = [],
276
-     $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
276
+        $type = '', $fromname = '', $toname = '', $cc = [], $attach = [])
277 277
     {
278 278
         try {
279 279
             $transform = [];
@@ -303,21 +303,21 @@  discard block
 block discarded – undo
303 303
                 }
304 304
 
305 305
             });
306
-             \DB::table('email_log')->insert([
306
+                \DB::table('email_log')->insert([
307 307
                 'date' => date('Y-m-d H:i:s'),
308 308
             'from' => $from,
309 309
             'to' => $to,
310
-             'subject' => $subject,
310
+                'subject' => $subject,
311 311
             'body' => $data,
312
-          'status' => 'success',
313
-          ]);
312
+            'status' => 'success',
313
+            ]);
314 314
             return 'success';
315 315
         } catch (\Exception $ex) {
316 316
             \DB::table('email_log')->insert([
317 317
             'date' => date('Y-m-d H:i:s'),
318 318
             'from' => $from,
319 319
             'to' => $to,
320
-             'subject' => $subject,
320
+                'subject' => $subject,
321 321
             'body' => $data,
322 322
           
323 323
             'status' => 'failed',
Please login to merge, or discard this patch.
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -122,18 +122,18 @@  discard block
 block discarded – undo
122 122
     public function getTemplates()
123 123
     {
124 124
         return \DataTables::of($this->template->select('id', 'name', 'type')->get())
125
-                        ->addColumn('checkbox', function ($model) {
125
+                        ->addColumn('checkbox', function($model) {
126 126
                             return "<input type='checkbox' class='template_checkbox' 
127 127
                             value=".$model->id.' name=select[] id=check>';
128 128
                         })
129 129
 
130
-                         ->addColumn('name', function ($model) {
130
+                         ->addColumn('name', function($model) {
131 131
                              return $model->name;
132 132
                          })
133
-                        ->addColumn('type', function ($model) {
133
+                        ->addColumn('type', function($model) {
134 134
                             return $this->type->where('id', $model->type)->first()->name;
135 135
                         })
136
-                        ->addColumn('action', function ($model) {
136
+                        ->addColumn('action', function($model) {
137 137
                             return '<a href='.url('templates/'.$model->id.'/edit').
138 138
                             " class='btn btn-sm btn-primary btn-xs'><i class='fa fa-edit'
139 139
                                  style='color:white;'> </i>&nbsp;&nbsp;Edit</a>";
@@ -282,7 +282,7 @@  discard block
 block discarded – undo
282 282
             $data = $page_controller->transform($type, $data, $transform);
283 283
             $settings = \App\Model\Common\Setting::find(1);
284 284
             $fromname = $settings->company;
285
-            \Mail::send('emails.mail', ['data' => $data], function ($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
285
+            \Mail::send('emails.mail', ['data' => $data], function($m) use ($from, $to, $subject, $fromname, $toname, $cc, $attach) {
286 286
                 $status = 'success';
287 287
                 $m->from($from, $fromname);
288 288
 
Please login to merge, or discard this patch.
app/Http/Controllers/User/ClientController.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -76,18 +76,18 @@  discard block
 block discarded – undo
76 76
          $mobile, $email, $country, $industry, $company_type, $company_size, $role, $position);
77 77
 
78 78
         return\ DataTables::of($user->get())
79
-                         ->addColumn('checkbox', function ($model) {
79
+                         ->addColumn('checkbox', function($model) {
80 80
                              return "<input type='checkbox' class='user_checkbox' 
81 81
                             value=".$model->id.' name=select[] id=check>';
82 82
                          })
83
-                        ->addColumn('first_name', function ($model) {
83
+                        ->addColumn('first_name', function($model) {
84 84
                             return '<a href='.url('clients/'.$model->id).'>'
85 85
                             .ucfirst($model->first_name).' '.ucfirst($model->last_name).'</a>';
86 86
                         })
87
-                         ->addColumn('email', function ($model) {
87
+                         ->addColumn('email', function($model) {
88 88
                              return $model->email;
89 89
                          })
90
-                          ->addColumn('created_at', function ($model) {
90
+                          ->addColumn('created_at', function($model) {
91 91
                               $ends = $model->created_at;
92 92
                               if ($ends) {
93 93
                                   $date = date_create($ends);
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
                               return $end;
98 98
                           })
99 99
                         // ->showColumns('email', 'created_at')
100
-                        ->addColumn('active', function ($model) {
100
+                        ->addColumn('active', function($model) {
101 101
                             if ($model->active == 1) {
102 102
                                 $email = "<span class='glyphicon glyphicon-envelope'
103 103
                                  style='color:green' title='verified email'></span>";
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 
116 116
                             return $email.'&nbsp;&nbsp;'.$mobile;
117 117
                         })
118
-                        ->addColumn('action', function ($model) {
118
+                        ->addColumn('action', function($model) {
119 119
                             return '<a href='.url('clients/'.$model->id.'/edit')
120 120
                             ." class='btn btn-sm btn-primary btn-xs'>
121 121
                             <i class='fa fa-edit' style='color:white;'> </i>&nbsp;&nbsp;Edit</a>"
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
                                     <i class='fa fa-eye' style='color:white;'> </i>&nbsp;&nbsp;View</a>";
125 125
                             // return 'hhhh';
126 126
                         })
127
-                        ->rawColumns(['checkbox', 'first_name', 'email',  'created_at', 'active', 'action'])
127
+                        ->rawColumns(['checkbox', 'first_name', 'email', 'created_at', 'active', 'action'])
128 128
                         ->make(true);
129 129
 
130 130
         // ->searchColumns('email', 'first_name')
@@ -334,13 +334,13 @@  discard block
 block discarded – undo
334 334
      */
335 335
     public function update($id, Request $request)
336 336
     {
337
-        try{
337
+        try {
338 338
         $user = $this->user->where('id', $id)->first();
339 339
 
340 340
         $user->fill($request->input())->save();
341 341
 
342 342
         return redirect()->back()->with('success', \Lang::get('message.updated-successfully'));
343
-    }catch (\Exception $ex) {
343
+    } catch (\Exception $ex) {
344 344
             app('log')->useDailyFiles(storage_path().'/laravel.log');
345 345
             app('log')->error($ex->getMessage());
346 346
             Bugsnag::notifyException($ex);
Please login to merge, or discard this patch.
Braces   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -334,13 +334,13 @@
 block discarded – undo
334 334
      */
335 335
     public function update($id, Request $request)
336 336
     {
337
-        try{
337
+        try {
338 338
         $user = $this->user->where('id', $id)->first();
339 339
 
340 340
         $user->fill($request->input())->save();
341 341
 
342 342
         return redirect()->back()->with('success', \Lang::get('message.updated-successfully'));
343
-    }catch (\Exception $ex) {
343
+    } catch (\Exception $ex) {
344 344
             app('log')->useDailyFiles(storage_path().'/laravel.log');
345 345
             app('log')->error($ex->getMessage());
346 346
             Bugsnag::notifyException($ex);
Please login to merge, or discard this patch.