Completed
Push — master ( f8d969...239ffe )
by Turcan
09:40
created
app/Http/Controllers/Training_Resource_Controller.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -18,8 +18,9 @@
 block discarded – undo
18 18
 
19 19
         $id = Input::get('training_resource_parentResourceId');
20 20
 
21
-        if ($id || ($id == 0))
22
-            $training_resources = $training_resources::where('training_resource_parentResourceId', '=', $id);
21
+        if ($id || ($id == 0)) {
22
+                    $training_resources = $training_resources::where('training_resource_parentResourceId', '=', $id);
23
+        }
23 24
 
24 25
         return $training_resources->get();
25 26
 
Please login to merge, or discard this patch.
app/Http/Middleware/Authenticate.php 1 patch
Braces   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,8 +37,7 @@
 block discarded – undo
37 37
 			if ($request->ajax())
38 38
 			{
39 39
 				return response('Unauthorized.', 401);
40
-			}
41
-			else
40
+			} else
42 41
 			{
43 42
 				return redirect()->guest('auth/login');
44 43
 			}
Please login to merge, or discard this patch.
app/Training_Resource.php 1 patch
Braces   +6 added lines, -2 removed lines patch added patch discarded remove patch
@@ -97,8 +97,12 @@
 block discarded – undo
97 97
     public function pare($pare)
98 98
     {
99 99
         $this->training_resource()->detach();
100
-        if ( ! $pare) return;
101
-        if ( ! $this->exists) $this->save();
100
+        if ( ! $pare) {
101
+        	return;
102
+        }
103
+        if ( ! $this->exists) {
104
+        	$this->save();
105
+        }
102 106
         $this->training_resource()->attach($pare);
103 107
     }
104 108
 
Please login to merge, or discard this patch.