@@ -24,7 +24,7 @@ |
||
| 24 | 24 | return (new MailMessage) |
| 25 | 25 | ->subject('Your Reset Password Subject Here') |
| 26 | 26 | ->line('You are receiving this email because we received a password reset request for your account.') |
| 27 | - ->action('Reset Password', env('FRONTEND_URL', 'http://localhost:3000') . '/password/reset/'.$this->token) |
|
| 27 | + ->action('Reset Password', env('FRONTEND_URL', 'http://localhost:3000') . '/password/reset/' . $this->token) |
|
| 28 | 28 | ->line('If you did not request a password reset, no further action is required.'); |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | \ No newline at end of file |
@@ -46,7 +46,7 @@ |
||
| 46 | 46 | return (new MailMessage) |
| 47 | 47 | ->subject('Unsubscribed Successfully!') |
| 48 | 48 | ->line('You have unsubscribed successfully!') |
| 49 | - ->line('Subscription Plan:'.$this->plan->nickname) |
|
| 49 | + ->line('Subscription Plan:' . $this->plan->nickname) |
|
| 50 | 50 | ->line('Thank you for using Genealogia!'); |
| 51 | 51 | } |
| 52 | 52 | |
@@ -33,7 +33,7 @@ |
||
| 33 | 33 | */ |
| 34 | 34 | public function register() |
| 35 | 35 | { |
| 36 | - $this->reportable(function (Throwable $e) { |
|
| 36 | + $this->reportable(function(Throwable $e) { |
|
| 37 | 37 | // |
| 38 | 38 | }); |
| 39 | 39 | } |
@@ -26,11 +26,11 @@ |
||
| 26 | 26 | // $tree = Tree::where('company_id', $company->company_id)->first(); |
| 27 | 27 | // $tenant = Tenant::where('tree_id', $tree->id)->first(); |
| 28 | 28 | // $tenant->makeCurrent(); |
| 29 | - if(Tenant::checkCurrent()) { |
|
| 29 | + if (Tenant::checkCurrent()) { |
|
| 30 | 30 | Tenant::forgetCurrent(); |
| 31 | 31 | $user = auth()->user(); |
| 32 | - $company = $user->Company()->where('current_tenant','=',1)->first(); |
|
| 33 | - $tree = Tree::where('current_tenant','=',1)->where('company_id', $company->id)->first(); |
|
| 32 | + $company = $user->Company()->where('current_tenant', '=', 1)->first(); |
|
| 33 | + $tree = Tree::where('current_tenant', '=', 1)->where('company_id', $company->id)->first(); |
|
| 34 | 34 | $tenant = Tenant::where('tree_id', $tree->id)->first(); |
| 35 | 35 | $tenant->makeCurrent(); |
| 36 | 36 | } |
@@ -14,7 +14,7 @@ |
||
| 14 | 14 | */ |
| 15 | 15 | protected function redirectTo($request) |
| 16 | 16 | { |
| 17 | - if (! $request->expectsJson()) { |
|
| 17 | + if (!$request->expectsJson()) { |
|
| 18 | 18 | return route('login'); |
| 19 | 19 | } |
| 20 | 20 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = PersonName::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 | |
@@ -163,7 +163,7 @@ discard block |
||
| 163 | 163 | public function destroy($id) |
| 164 | 164 | { |
| 165 | 165 | $personname = PersonName::find($id); |
| 166 | - if($personname) { |
|
| 166 | + if ($personname) { |
|
| 167 | 167 | $personname->delete(); |
| 168 | 168 | return "true"; |
| 169 | 169 | } |
@@ -16,34 +16,34 @@ discard block |
||
| 16 | 16 | { |
| 17 | 17 | $query = Event::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 | |
@@ -127,7 +127,7 @@ discard block |
||
| 127 | 127 | public function destroy($id) |
| 128 | 128 | { |
| 129 | 129 | $event = Event::find($id); |
| 130 | - if($event) { |
|
| 130 | + if ($event) { |
|
| 131 | 131 | $event->delete(); |
| 132 | 132 | return "true"; |
| 133 | 133 | } |
@@ -16,39 +16,39 @@ discard block |
||
| 16 | 16 | */ |
| 17 | 17 | public function index(Request $request) |
| 18 | 18 | { |
| 19 | - $query = Source::query()->with(['publication','repositories','author','type']); |
|
| 19 | + $query = Source::query()->with(['publication', 'repositories', 'author', 'type']); |
|
| 20 | 20 | |
| 21 | - if($request->has('searchTerm')) { |
|
| 22 | - $columnsToSearch = ['titl', 'sour', 'auth','data','text','publ','abbr','name','description','repository_id','author_id','publication_id','type_id','is_active','group','quay','page']; |
|
| 21 | + if ($request->has('searchTerm')) { |
|
| 22 | + $columnsToSearch = ['titl', 'sour', 'auth', 'data', 'text', 'publ', 'abbr', 'name', 'description', 'repository_id', 'author_id', 'publication_id', 'type_id', 'is_active', 'group', 'quay', 'page']; |
|
| 23 | 23 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 24 | - if(!empty($search_term)) { |
|
| 24 | + if (!empty($search_term)) { |
|
| 25 | 25 | $searchQuery = '%' . $search_term . '%'; |
| 26 | - foreach($columnsToSearch as $column) { |
|
| 26 | + foreach ($columnsToSearch as $column) { |
|
| 27 | 27 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 28 | 28 | } |
| 29 | 29 | } |
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - if($request->has('columnFilters')) { |
|
| 32 | + if ($request->has('columnFilters')) { |
|
| 33 | 33 | |
| 34 | 34 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 35 | - $relationship_column = array('repositories.name','author.name','publication.name','type.name'); |
|
| 36 | - foreach($filters as $key => $value) { |
|
| 37 | - if(!in_array($key, $relationship_column)) |
|
| 35 | + $relationship_column = array('repositories.name', 'author.name', 'publication.name', 'type.name'); |
|
| 36 | + foreach ($filters as $key => $value) { |
|
| 37 | + if (!in_array($key, $relationship_column)) |
|
| 38 | 38 | { |
| 39 | - if(!empty($value)) { |
|
| 39 | + if (!empty($value)) { |
|
| 40 | 40 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 41 | 41 | } |
| 42 | 42 | } |
| 43 | 43 | } |
| 44 | 44 | } |
| 45 | 45 | |
| 46 | - if($request->has('sort.0')) { |
|
| 46 | + if ($request->has('sort.0')) { |
|
| 47 | 47 | $sort = json_decode($request->sort[0]); |
| 48 | 48 | $query->orderBy($sort->field, $sort->type); |
| 49 | 49 | } |
| 50 | 50 | |
| 51 | - if($request->has("perPage")) { |
|
| 51 | + if ($request->has("perPage")) { |
|
| 52 | 52 | $rows = $query->paginate($request->perPage); |
| 53 | 53 | } |
| 54 | 54 | |
@@ -180,7 +180,7 @@ discard block |
||
| 180 | 180 | public function destroy($id) |
| 181 | 181 | { |
| 182 | 182 | $source = Source::find($id); |
| 183 | - if($source) { |
|
| 183 | + if ($source) { |
|
| 184 | 184 | $source->delete(); |
| 185 | 185 | return "true"; |
| 186 | 186 | } |
@@ -13,39 +13,39 @@ discard block |
||
| 13 | 13 | */ |
| 14 | 14 | public function index(Request $request) |
| 15 | 15 | { |
| 16 | - $query = Repository::query()->with(['type','addr']); |
|
| 16 | + $query = Repository::query()->with(['type', 'addr']); |
|
| 17 | 17 | |
| 18 | - if($request->has('searchTerm')) { |
|
| 19 | - $columnsToSearch = ['repo','name','addr_id','rin','email','phon','fax','www','description','type_id','is_active']; |
|
| 18 | + if ($request->has('searchTerm')) { |
|
| 19 | + $columnsToSearch = ['repo', 'name', 'addr_id', 'rin', 'email', 'phon', 'fax', 'www', 'description', 'type_id', 'is_active']; |
|
| 20 | 20 | $search_term = json_decode($request->searchTerm)->searchTerm; |
| 21 | - if(!empty($search_term)) { |
|
| 21 | + if (!empty($search_term)) { |
|
| 22 | 22 | $searchQuery = '%' . $search_term . '%'; |
| 23 | - foreach($columnsToSearch as $column) { |
|
| 23 | + foreach ($columnsToSearch as $column) { |
|
| 24 | 24 | $query->orWhere($column, 'LIKE', $searchQuery); |
| 25 | 25 | } |
| 26 | 26 | } |
| 27 | 27 | } |
| 28 | 28 | |
| 29 | - if($request->has('columnFilters')) { |
|
| 29 | + if ($request->has('columnFilters')) { |
|
| 30 | 30 | |
| 31 | 31 | $filters = get_object_vars(json_decode($request->columnFilters)); |
| 32 | - $relationship_column = array('addr.adr1','type.name'); |
|
| 33 | - foreach($filters as $key => $value) { |
|
| 34 | - if(!in_array($key, $relationship_column)) |
|
| 32 | + $relationship_column = array('addr.adr1', 'type.name'); |
|
| 33 | + foreach ($filters as $key => $value) { |
|
| 34 | + if (!in_array($key, $relationship_column)) |
|
| 35 | 35 | { |
| 36 | - if(!empty($value)) { |
|
| 36 | + if (!empty($value)) { |
|
| 37 | 37 | $query->orWhere($key, 'like', '%' . $value . '%'); |
| 38 | 38 | } |
| 39 | 39 | } |
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | - if($request->has('sort.0')) { |
|
| 43 | + if ($request->has('sort.0')) { |
|
| 44 | 44 | $sort = json_decode($request->sort[0]); |
| 45 | 45 | $query->orderBy($sort->field, $sort->type); |
| 46 | 46 | } |
| 47 | 47 | |
| 48 | - if($request->has("perPage")) { |
|
| 48 | + if ($request->has("perPage")) { |
|
| 49 | 49 | $rows = $query->paginate($request->perPage); |
| 50 | 50 | } |
| 51 | 51 | |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | public function destroy($id) |
| 160 | 160 | { |
| 161 | 161 | $repository = Repository::find($id); |
| 162 | - if($repository) { |
|
| 162 | + if ($repository) { |
|
| 163 | 163 | $repository->delete(); |
| 164 | 164 | return "true"; |
| 165 | 165 | } |