@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = PersonSubm::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')){ |
|
| 20 | - $columnsToSearch = ['group','subm']; |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | + $columnsToSearch = ['group', 'subm']; |
|
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | public function destroy($id) |
| 132 | 132 | { |
| 133 | 133 | $personsubm = PersonSubm::find($id); |
| 134 | - if($personsubm) { |
|
| 134 | + if ($personsubm) { |
|
| 135 | 135 | $personsubm->delete(); |
| 136 | 136 | return "true"; |
| 137 | 137 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = FamilySlgs::query()->with('family'); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 20 | - $columnsToSearch = ['family_id', 'stat', 'date','plac','temp']; |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | + $columnsToSearch = ['family_id', 'stat', 'date', 'plac', 'temp']; |
|
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | public function destroy($id) |
| 144 | 144 | { |
| 145 | 145 | $familyslgs = FamilySlgs::find($id); |
| 146 | - if($familyslgs) { |
|
| 146 | + if ($familyslgs) { |
|
| 147 | 147 | $familyslgs->delete(); |
| 148 | 148 | return "true"; |
| 149 | 149 | } |
@@ -44,7 +44,7 @@ discard block |
||
| 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 | |
@@ -88,7 +88,7 @@ discard block |
||
| 88 | 88 | * @return \Illuminate\Http\Response |
| 89 | 89 | */ |
| 90 | 90 | public function show($id) { |
| 91 | - return ForumTopic::where('slug',$id)->with('category')->with('posts')->with('author')->first(); |
|
| 91 | + return ForumTopic::where('slug', $id)->with('category')->with('posts')->with('author')->first(); |
|
| 92 | 92 | } |
| 93 | 93 | |
| 94 | 94 | /** |
@@ -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 | |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = PersonDesi::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | 20 | $columnsToSearch = ['name', 'email', 'phone']; |
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | public function destroy($id) |
| 136 | 136 | { |
| 137 | 137 | $persondesi = PersonDesi::find($id); |
| 138 | - if($persondesi) { |
|
| 138 | + if ($persondesi) { |
|
| 139 | 139 | $persondesi->delete(); |
| 140 | 140 | return "true"; |
| 141 | 141 | } |
@@ -16,34 +16,34 @@ |
||
| 16 | 16 | { |
| 17 | 17 | $query = DnaMatching::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | 20 | $columnsToSearch = ['name']; |
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -70,7 +70,7 @@ |
||
| 70 | 70 | { |
| 71 | 71 | $request->validate([ |
| 72 | 72 | 'refn' => 'required' |
| 73 | - ]); |
|
| 73 | + ]); |
|
| 74 | 74 | |
| 75 | 75 | return Refn::create([ |
| 76 | 76 | 'group' => $request->group, |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = Refn::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 20 | - $columnsToSearch = ['group','refn','type']; |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | + $columnsToSearch = ['group', 'refn', 'type']; |
|
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -131,7 +131,7 @@ discard block |
||
| 131 | 131 | public function destroy($id) |
| 132 | 132 | { |
| 133 | 133 | $refn = Refn::find($id); |
| 134 | - if($refn) { |
|
| 134 | + if ($refn) { |
|
| 135 | 135 | $refn->delete(); |
| 136 | 136 | return "true"; |
| 137 | 137 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = SourceRef::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | 20 | $columnsToSearch = ['name', 'email', 'phone']; |
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -143,7 +143,7 @@ discard block |
||
| 143 | 143 | public function destroy($id) |
| 144 | 144 | { |
| 145 | 145 | $sourceref = SourceRef::find($id); |
| 146 | - if($sourceref) { |
|
| 146 | + if ($sourceref) { |
|
| 147 | 147 | $sourceref->delete(); |
| 148 | 148 | return "true"; |
| 149 | 149 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = PersonAlia::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 20 | - $columnsToSearch = ['group','alia','import_confirm']; |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | + $columnsToSearch = ['group', 'alia', 'import_confirm']; |
|
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | public function destroy($id) |
| 136 | 136 | { |
| 137 | 137 | $personalia = PersonAlia::find($id); |
| 138 | - if($personalia) { |
|
| 138 | + if ($personalia) { |
|
| 139 | 139 | $personalia->delete(); |
| 140 | 140 | return "true"; |
| 141 | 141 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = Author::query(); |
| 18 | 18 | |
| 19 | - if($request->has('searchTerm')) { |
|
| 19 | + if ($request->has('searchTerm')) { |
|
| 20 | 20 | $columnsToSearch = ['name', 'description', 'is_active']; |
| 21 | 21 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 22 | - if(!empty($search_term)) { |
|
| 22 | + if (!empty($search_term)) { |
|
| 23 | 23 | $searchQuery = '%' . $search_term . '%'; |
| 24 | - foreach($columnsToSearch as $column) { |
|
| 24 | + foreach ($columnsToSearch as $column) { |
|
| 25 | 25 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | - if($request->has('columnFilters')) { |
|
| 30 | + if ($request->has('columnFilters')) { |
|
| 31 | 31 | |
| 32 | 32 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 33 | 33 | |
| 34 | - foreach($filters as $key => $value) { |
|
| 35 | - if(!empty($value)) { |
|
| 34 | + foreach ($filters as $key => $value) { |
|
| 35 | + if (!empty($value)) { |
|
| 36 | 36 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 37 | 37 | } |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | |
| 41 | - if($request->has('sort.0')) { |
|
| 41 | + if ($request->has('sort.0')) { |
|
| 42 | 42 | $sort = json_decode($request->sort[0]); |
| 43 | 43 | $query->orderBy($sort->field, $sort->type); |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has("perPage")) { |
|
| 46 | + if ($request->has("perPage")) { |
|
| 47 | 47 | $rows = $query->paginate($request->perPage); |
| 48 | 48 | } |
| 49 | 49 | |
@@ -135,7 +135,7 @@ discard block |
||
| 135 | 135 | public function destroy($id) |
| 136 | 136 | { |
| 137 | 137 | $author = Author::find($id); |
| 138 | - if($author) { |
|
| 138 | + if ($author) { |
|
| 139 | 139 | $author->delete(); |
| 140 | 140 | return "true"; |
| 141 | 141 | } |