Passed
Push — dev5 ( 3685b3...3ab1f5 )
by Ron
07:25
created
routes/web.php 1 patch
Braces   +2 added lines, -4 removed lines patch added patch discarded remove patch
@@ -64,8 +64,7 @@  discard block
 block discarded – undo
64 64
 /*
65 65
 *   Customer Routes
66 66
 */
67
-Route::prefix('customer')->name('customer.')->group(function()
68
-{
67
+Route::prefix('customer')->name('customer.')->group(function() {
69 68
     //  Customer Files
70 69
     Route::resource('files',                   'Customers\CustomerFilesController');
71 70
     //  Custome Notes
@@ -91,8 +90,7 @@  discard block
 block discarded – undo
91 90
 *   Tech Tip Routes
92 91
 */
93 92
 Route::resource('tips', 'TechTips\TechTipsController');
94
-Route::prefix('tip')->name('tip.')->group(function()
95
-{
93
+Route::prefix('tip')->name('tip.')->group(function() {
96 94
     Route::get('search', 'TechTips\TechTipsController@search')->name('search');
97 95
     Route::get('details/{id}/{name}', 'TechTips\TechTipsController@details')->name('details');
98 96
     Route::post('process-image', 'TechTips\TechTipsController@processImage')->name('processImage');
Please login to merge, or discard this patch.
app/Http/Controllers/TechTips/TechTipsController.php 1 patch
Braces   +8 added lines, -5 removed lines patch added patch discarded remove patch
@@ -63,14 +63,17 @@  discard block
 block discarded – undo
63 63
         Log::debug('request Data -> ', $request->toArray());
64 64
 
65 65
         //  See if there are any search paramaters entered
66
-        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType'])) {
66
+        if (!$request->search['searchText'] && !isset($request->search['articleType']) && !isset($request->search['systemType']))
67
+        {
67 68
             //  No search paramaters, send all tech tips
68 69
             $tips = new TechTipsCollection(
69 70
                 TechTips::orderBy('created_at', 'DESC')
70 71
                     ->with('SystemTypes')
71 72
                     ->paginate($request->pagination['perPage'])
72 73
             );
73
-        } else {
74
+        }
75
+        else
76
+        {
74 77
             $article = isset($request->search['articleType']) ? true : false;
75 78
             $system  = isset($request->search['systemType'])  ? true : false;
76 79
             //  Search paramaters, filter results
@@ -158,7 +161,8 @@  discard block
 block discarded – undo
158 161
         $save = $receiver->receive();
159 162
 
160 163
         //  See if the uploade has finished
161
-        if ($save->isFinished()) {
164
+        if ($save->isFinished())
165
+        {
162 166
             $this->saveFile($save->getFile());
163 167
 
164 168
             return 'uploaded successfully';
@@ -252,8 +256,7 @@  discard block
 block discarded – undo
252 256
         if(!$tipData->supressEmail)
253 257
         {
254 258
             $details = TechTips::find($tipID);
255
-            $users = User::where('active', 1)->whereHas('UserSettings', function($query)
256
-            {
259
+            $users = User::where('active', 1)->whereHas('UserSettings', function($query) {
257 260
                 $query->where('em_tech_tip', 1);
258 261
             })->get();
259 262
 
Please login to merge, or discard this patch.