@@ -69,8 +69,7 @@ |
||
| 69 | 69 | $tree->current_tenant = 1; |
| 70 | 70 | $tree->save(); |
| 71 | 71 | return response()->json(['changedb' => true]); |
| 72 | - } |
|
| 73 | - else { |
|
| 72 | + } else { |
|
| 74 | 73 | return response()->json(['changedb' => false]); |
| 75 | 74 | } |
| 76 | 75 | } |
@@ -90,20 +90,15 @@ |
||
| 90 | 90 | } else { |
| 91 | 91 | return response()->json(['create_tree' => false]); |
| 92 | 92 | } |
| 93 | - } |
|
| 94 | - |
|
| 95 | - else if ($role == 5 || $role == 6) { |
|
| 93 | + } else if ($role == 5 || $role == 6) { |
|
| 96 | 94 | if(Tree::whereIn('company_id', $companies_id)->count() < 10){ |
| 97 | 95 | return response()->json(['create_tree' => true]); |
| 98 | 96 | } else { |
| 99 | 97 | return response()->json(['create_tree' => false]); |
| 100 | 98 | } |
| 101 | - } |
|
| 102 | - |
|
| 103 | - else if ($role == 3 || $role == 4) { |
|
| 99 | + } else if ($role == 3 || $role == 4) { |
|
| 104 | 100 | return response()->json(['create_tree' => true]); |
| 105 | - } |
|
| 106 | - else { |
|
| 101 | + } else { |
|
| 107 | 102 | return response()->json(['create_tree' => false]); |
| 108 | 103 | } |
| 109 | 104 | |
@@ -152,8 +152,7 @@ |
||
| 152 | 152 | 'message' => __('The dna was successfully deleted'), |
| 153 | 153 | 'redirect' => 'dna.index', |
| 154 | 154 | ]; |
| 155 | - } |
|
| 156 | - else |
|
| 155 | + } else |
|
| 157 | 156 | { |
| 158 | 157 | return [ |
| 159 | 158 | 'message' => __('The dna could not be deleted'), |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | if ($request->has("perPage")) { |
| 46 | 46 | $rows = $query->paginate($request->perPage); |
| 47 | - }else{ |
|
| 47 | + } else{ |
|
| 48 | 48 | $rows = $query->get(); |
| 49 | 49 | } |
| 50 | 50 | |
@@ -20,7 +20,9 @@ |
||
| 20 | 20 | public function forgot(Request $request) { |
| 21 | 21 | $credentials = request()->validate(['email' => 'required|email']); |
| 22 | 22 | $user = User::where ('email', $request->email)->first(); |
| 23 | - if ( !$user ) return response()->json(['error' => '404','error_msg' => 'Email not exits in record']); |
|
| 23 | + if ( !$user ) { |
|
| 24 | + return response()->json(['error' => '404','error_msg' => 'Email not exits in record']); |
|
| 25 | + } |
|
| 24 | 26 | $token = $this->generateToken(); |
| 25 | 27 | DB::connection($this->getConnectionName())->table('password_resets')->insert([ |
| 26 | 28 | 'email' => $request->email, |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | |
| 45 | 45 | if ($request->has("perPage")) { |
| 46 | 46 | $rows = $query->paginate($request->perPage); |
| 47 | - }else{ |
|
| 47 | + } else{ |
|
| 48 | 48 | $rows = $query->get(); |
| 49 | 49 | } |
| 50 | 50 | |