@@ -32,9 +32,9 @@ discard block |
||
| 32 | 32 | { |
| 33 | 33 | // Related field |
| 34 | 34 | $relatedField = $relatedList->relatedField; |
| 35 | - $filter = ['order' => request('order')]; |
|
| 35 | + $filter = [ 'order' => request('order') ]; |
|
| 36 | 36 | |
| 37 | - $query = $query->where(function (Builder $_query) use ($recordId, $relatedList, $relatedField) { |
|
| 37 | + $query = $query->where(function(Builder $_query) use ($recordId, $relatedList, $relatedField) { |
|
| 38 | 38 | // Search by id |
| 39 | 39 | $_query->where($relatedField->column, $recordId); |
| 40 | 40 | |
@@ -64,7 +64,7 @@ discard block |
||
| 64 | 64 | // Related field |
| 65 | 65 | $relatedField = $relatedList->relatedField; |
| 66 | 66 | |
| 67 | - return $relatedModel::where(function (Builder $_query) use ($recordId, $relatedList, $relatedField) { |
|
| 67 | + return $relatedModel::where(function(Builder $_query) use ($recordId, $relatedList, $relatedField) { |
|
| 68 | 68 | // Search by id |
| 69 | 69 | $_query->where($relatedField->column, $recordId); |
| 70 | 70 | |
@@ -115,7 +115,7 @@ discard block |
||
| 115 | 115 | $relationName = $relatedList->relationName; |
| 116 | 116 | |
| 117 | 117 | $record = $modelClass::find($recordId); |
| 118 | - $filter = ['order' => request('order')]; |
|
| 118 | + $filter = [ 'order' => request('order') ]; |
|
| 119 | 119 | |
| 120 | 120 | $query = $record->$relationName() |
| 121 | 121 | ->filterBy($filter); |
@@ -51,17 +51,17 @@ discard block |
||
| 51 | 51 | // Get filters |
| 52 | 52 | $filters = Filter::where('module_id', $module->id) // Module |
| 53 | 53 | ->where('type', 'list') // Type (list) |
| 54 | - ->where(function ($query) use($domain) { // Domain |
|
| 54 | + ->where(function($query) use($domain) { // Domain |
|
| 55 | 55 | $query->whereNull('domain_id') |
| 56 | 56 | ->orWhere('domain_id', $domain->getKey()); |
| 57 | 57 | }) |
| 58 | - ->where(function ($query) { // User |
|
| 58 | + ->where(function($query) { // User |
|
| 59 | 59 | $query->where('is_public', true) |
| 60 | - ->orWhere(function ($query) { |
|
| 60 | + ->orWhere(function($query) { |
|
| 61 | 61 | $query->where('is_public', false) |
| 62 | 62 | ->where('user_id', '=', auth()->id()); |
| 63 | 63 | }) |
| 64 | - ->orWhere(function ($query) { |
|
| 64 | + ->orWhere(function($query) { |
|
| 65 | 65 | $query->where('is_public', false) |
| 66 | 66 | ->whereNull('user_id'); |
| 67 | 67 | }); |
@@ -70,7 +70,7 @@ discard block |
||
| 70 | 70 | ->get(); |
| 71 | 71 | |
| 72 | 72 | // Order |
| 73 | - $filterOrder = (array) $selectedFilter->order; |
|
| 73 | + $filterOrder = (array)$selectedFilter->order; |
|
| 74 | 74 | |
| 75 | 75 | // See descendants |
| 76 | 76 | $seeDescendants = request()->session()->get('descendants'); |
@@ -154,7 +154,7 @@ discard block |
||
| 154 | 154 | if ($relatedList && $relatedList->method) { |
| 155 | 155 | // Related list method |
| 156 | 156 | $method = $relatedList->method; |
| 157 | - $recordIdsMethod = $method . 'RecordIds'; |
|
| 157 | + $recordIdsMethod = $method.'RecordIds'; |
|
| 158 | 158 | |
| 159 | 159 | // Get related records ids |
| 160 | 160 | $model = new $modelClass; |
@@ -162,7 +162,7 @@ discard block |
||
| 162 | 162 | |
| 163 | 163 | // Add the record id itself to be filtered |
| 164 | 164 | if ($relatedList->module_id === $relatedList->related_module_id && !empty($recordId) && !$filteredRecordIds->contains($recordId)) { |
| 165 | - $filteredRecordIds[] = (int)$recordId; |
|
| 165 | + $filteredRecordIds[ ] = (int)$recordId; |
|
| 166 | 166 | } |
| 167 | 167 | |
| 168 | 168 | if ($relatedList->module_id) { |
@@ -177,7 +177,7 @@ discard block |
||
| 177 | 177 | $records = $query->paginate($length); |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | - $records->getCollection()->transform(function ($record) use ($domain, $module, $relatedModule) { |
|
| 180 | + $records->getCollection()->transform(function($record) use ($domain, $module, $relatedModule) { |
|
| 181 | 181 | foreach ($module->fields as $field) { |
| 182 | 182 | // If a special template exists, use it. Else use the generic template |
| 183 | 183 | $uitype = uitype($field->uitype_id); |
@@ -228,7 +228,7 @@ discard block |
||
| 228 | 228 | $results = collect(); |
| 229 | 229 | if (method_exists($modelClass, 'getSearchResult') && property_exists($modelClass, 'searchableColumns')) { |
| 230 | 230 | $searchResults = new Search(); |
| 231 | - $searchResults->registerModel($modelClass, (array) (new $modelClass)->searchableColumns); |
|
| 231 | + $searchResults->registerModel($modelClass, (array)(new $modelClass)->searchableColumns); |
|
| 232 | 232 | $results = $searchResults->search($q)->take(config('uccello.max_results.autocomplete', 10)); |
| 233 | 233 | } |
| 234 | 234 | |
@@ -249,9 +249,9 @@ discard block |
||
| 249 | 249 | $savePageLength = $request->input('save_page_length'); |
| 250 | 250 | |
| 251 | 251 | // Optional data |
| 252 | - $data = []; |
|
| 252 | + $data = [ ]; |
|
| 253 | 253 | if ($savePageLength) { |
| 254 | - $data["length"] = $request->input('page_length'); |
|
| 254 | + $data[ "length" ] = $request->input('page_length'); |
|
| 255 | 255 | } |
| 256 | 256 | |
| 257 | 257 | $filter = Filter::firstOrNew([ |
@@ -343,9 +343,9 @@ discard block |
||
| 343 | 343 | protected function addSearchConditions($filter) |
| 344 | 344 | { |
| 345 | 345 | if ($this->request->has('search')) { |
| 346 | - $conditions = []; |
|
| 347 | - foreach ((array) $this->request->search as $fieldName => $value) { |
|
| 348 | - $conditions[$fieldName] = $value; |
|
| 346 | + $conditions = [ ]; |
|
| 347 | + foreach ((array)$this->request->search as $fieldName => $value) { |
|
| 348 | + $conditions[ $fieldName ] = $value; |
|
| 349 | 349 | } |
| 350 | 350 | |
| 351 | 351 | if ($conditions) { |
@@ -384,7 +384,7 @@ discard block |
||
| 384 | 384 | |
| 385 | 385 | if ($rules) { |
| 386 | 386 | foreach ($rules as $column => $rule) { |
| 387 | - $filter['columns'][$column]['search'] = $rule; |
|
| 387 | + $filter[ 'columns' ][ $column ][ 'search' ] = $rule; |
|
| 388 | 388 | } |
| 389 | 389 | } |
| 390 | 390 | } |
@@ -52,7 +52,7 @@ discard block |
||
| 52 | 52 | $modelClass = $module->model_class; |
| 53 | 53 | |
| 54 | 54 | $query = Entity::where('module_id', $module->id) |
| 55 | - ->whereNotIn('record_id', function ($query) use ($modelClass) { |
|
| 55 | + ->whereNotIn('record_id', function($query) use ($modelClass) { |
|
| 56 | 56 | $query->select('id') |
| 57 | 57 | ->from((new $modelClass)->getTable()) |
| 58 | 58 | ->get(); |
@@ -73,7 +73,7 @@ discard block |
||
| 73 | 73 | $modelClass = $module->model_class; |
| 74 | 74 | $count = $modelClass::count(); |
| 75 | 75 | $cpt = 0; |
| 76 | - $modelClass::chunkById(300, function ($records) use (&$cpt, $count) { |
|
| 76 | + $modelClass::chunkById(300, function($records) use (&$cpt, $count) { |
|
| 77 | 77 | $this->comment($cpt.'/'.$count); |
| 78 | 78 | foreach ($records as $record) { |
| 79 | 79 | $record->uuid; // Automaticaly generate cache (see \Uccello\Core\Support\Traits\UccelloModule getUuidAttribute()) |
@@ -28,11 +28,11 @@ discard block |
||
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | // Create uuid after save |
| 31 | - static::created(function ($model) { |
|
| 31 | + static::created(function($model) { |
|
| 32 | 32 | $module = Module::where('model_class', get_class($model))->first(); |
| 33 | 33 | if ($module) { |
| 34 | 34 | Entity::create([ |
| 35 | - 'id' => (string) Str::uuid(), |
|
| 35 | + 'id' => (string)Str::uuid(), |
|
| 36 | 36 | 'module_id' => $module->id, |
| 37 | 37 | 'record_id' => $model->getKey(), |
| 38 | 38 | 'creator_id' => auth()->id(), |
@@ -41,7 +41,7 @@ discard block |
||
| 41 | 41 | }); |
| 42 | 42 | |
| 43 | 43 | // Delete uuid after forced delete |
| 44 | - static::deleted(function ($model) { |
|
| 44 | + static::deleted(function($model) { |
|
| 45 | 45 | if (!empty($model->uuid) && (!method_exists($model, 'isForceDeleting') || $model->isForceDeleting() === true)) { |
| 46 | 46 | $entity = Entity::find($model->uuid); |
| 47 | 47 | if ($entity) { |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | public function initializeUccelloModule() |
| 55 | 55 | { |
| 56 | - $this->appends = array_merge($this->appends, ['recordLabel','uuid']); |
|
| 56 | + $this->appends = array_merge($this->appends, [ 'recordLabel', 'uuid' ]); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | protected static function isFilteredByUser() |
@@ -85,15 +85,15 @@ discard block |
||
| 85 | 85 | |
| 86 | 86 | protected static function getModuleFromClass($className) |
| 87 | 87 | { |
| 88 | - $modules = Cache::rememberForever('modules_by_model_class', function () { |
|
| 88 | + $modules = Cache::rememberForever('modules_by_model_class', function() { |
|
| 89 | 89 | $modulesGroupedByModelClass = collect(); |
| 90 | - Module::all()->map(function ($item) use ($modulesGroupedByModelClass) { |
|
| 91 | - $modulesGroupedByModelClass[$item->model_class] = $item; |
|
| 90 | + Module::all()->map(function($item) use ($modulesGroupedByModelClass) { |
|
| 91 | + $modulesGroupedByModelClass[ $item->model_class ] = $item; |
|
| 92 | 92 | return $modulesGroupedByModelClass; |
| 93 | 93 | }); |
| 94 | 94 | return $modulesGroupedByModelClass; |
| 95 | 95 | }); |
| 96 | - return $modules[(string) $className] ?? null; |
|
| 96 | + return $modules[ (string)$className ] ?? null; |
|
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | public function getUuidAttribute() |
@@ -103,7 +103,7 @@ discard block |
||
| 103 | 103 | $module = $this->module; |
| 104 | 104 | |
| 105 | 105 | if ($module) { |
| 106 | - return Cache::rememberForever('uuid_'.$module->getKey().'_'.$this->getKey(), function () use ($module) { |
|
| 106 | + return Cache::rememberForever('uuid_'.$module->getKey().'_'.$this->getKey(), function() use ($module) { |
|
| 107 | 107 | $entity = Entity::where('module_id', $module->getKey()) |
| 108 | 108 | ->where('record_id', $this->getKey()) |
| 109 | 109 | ->first(); |
@@ -159,7 +159,7 @@ discard block |
||
| 159 | 159 | if (!empty($domain) && Schema::hasColumn($this->table, 'domain_id')) { |
| 160 | 160 | // Activate descendant view if the user is allowed |
| 161 | 161 | if (Auth::user() && Auth::user()->canSeeDescendantsRecords($domain) && $withDescendants) { |
| 162 | - $query->whereIn('domain_id', function ($query) use ($domain) { |
|
| 162 | + $query->whereIn('domain_id', function($query) use ($domain) { |
|
| 163 | 163 | $query->select('id') |
| 164 | 164 | ->from((new Domain)->getTable()) |
| 165 | 165 | ->where('path', 'like', $domain->id.'/%') |
@@ -31,7 +31,7 @@ discard block |
||
| 31 | 31 | * |
| 32 | 32 | * @var array |
| 33 | 33 | */ |
| 34 | - protected $dates = ['deleted_at']; |
|
| 34 | + protected $dates = [ 'deleted_at' ]; |
|
| 35 | 35 | |
| 36 | 36 | /** |
| 37 | 37 | * The attributes that should be casted to native types. |
@@ -109,8 +109,8 @@ discard block |
||
| 109 | 109 | // Check if user is admin or if he has at least a role on the domain |
| 110 | 110 | // or on descendants domains if withDescendants option is on |
| 111 | 111 | $builder->where('domain_id', $domain->id) |
| 112 | - ->orWhereIn($this->getKeyName(), function ($query) use ($domain, $withDescendants) { |
|
| 113 | - $privilegesTable = env('UCCELLO_TABLE_PREFIX', 'uccello_') . 'privileges'; |
|
| 112 | + ->orWhereIn($this->getKeyName(), function($query) use ($domain, $withDescendants) { |
|
| 113 | + $privilegesTable = env('UCCELLO_TABLE_PREFIX', 'uccello_').'privileges'; |
|
| 114 | 114 | |
| 115 | 115 | $query->select('user_id') |
| 116 | 116 | ->from($privilegesTable); |
@@ -124,7 +124,7 @@ discard block |
||
| 124 | 124 | } |
| 125 | 125 | |
| 126 | 126 | if (Auth::user() && Auth::user()->canSeeDescendantsRecords($domain) && $withDescendants) { |
| 127 | - $query->orWhereIn('domain_id', function ($query) use ($domain) { |
|
| 127 | + $query->orWhereIn('domain_id', function($query) use ($domain) { |
|
| 128 | 128 | $query->select('id') |
| 129 | 129 | ->from((new Domain)->getTable()) |
| 130 | 130 | ->where('path', 'like', $domain->id.'/%') |
@@ -205,7 +205,7 @@ discard block |
||
| 205 | 205 | |
| 206 | 206 | $i = 0; |
| 207 | 207 | foreach ($words as $w) { |
| 208 | - $initials .= $w[0]; |
|
| 208 | + $initials .= $w[ 0 ]; |
|
| 209 | 209 | $i++; |
| 210 | 210 | |
| 211 | 211 | if ($i === 3) { // Maximum: 3 letters |
@@ -226,7 +226,7 @@ discard block |
||
| 226 | 226 | $image = 'vendor/uccello/uccello/images/user-no-image.png'; |
| 227 | 227 | |
| 228 | 228 | if ($this->avatarType === 'gravatar') { |
| 229 | - $image = 'https://www.gravatar.com/avatar/' . md5($this->email) . '?d=mm'; |
|
| 229 | + $image = 'https://www.gravatar.com/avatar/'.md5($this->email).'?d=mm'; |
|
| 230 | 230 | } elseif ($this->avatarType === 'image' && !empty($this->avatar->path)) { |
| 231 | 231 | $image = $this->avatar->path; |
| 232 | 232 | } |
@@ -272,14 +272,14 @@ discard block |
||
| 272 | 272 | if ($withAncestors && config('uccello.roles.display_ancestors_roles')) { |
| 273 | 273 | $treeDomainsIds = $domain->findAncestors()->pluck('id'); |
| 274 | 274 | } else { |
| 275 | - $treeDomainsIds = collect([$domain->id]); |
|
| 275 | + $treeDomainsIds = collect([ $domain->id ]); |
|
| 276 | 276 | } |
| 277 | 277 | |
| 278 | 278 | foreach ($treeDomainsIds as $treeDomainId) { |
| 279 | 279 | $_domain = Domain::find($treeDomainId); |
| 280 | 280 | foreach ($this->privileges->where('domain_id', $_domain->id) as $privilege) { |
| 281 | 281 | if (!$roles->contains($privilege->role)) { |
| 282 | - $roles[] = $privilege->role; |
|
| 282 | + $roles[ ] = $privilege->role; |
|
| 283 | 283 | } |
| 284 | 284 | } |
| 285 | 285 | } |
@@ -303,7 +303,7 @@ discard block |
||
| 303 | 303 | if ($withAncestors) { |
| 304 | 304 | $treeDomainsIds = $domain->findAncestors()->pluck('id'); |
| 305 | 305 | } else { |
| 306 | - $treeDomainsIds = collect([$domain->id]); |
|
| 306 | + $treeDomainsIds = collect([ $domain->id ]); |
|
| 307 | 307 | } |
| 308 | 308 | |
| 309 | 309 | foreach ($treeDomainsIds as $treeDomainId) { |
@@ -317,7 +317,7 @@ discard block |
||
| 317 | 317 | |
| 318 | 318 | foreach ($_privileges as $privilege) { |
| 319 | 319 | if (!$privileges->contains($privilege)) { |
| 320 | - $privileges[] = $privilege; |
|
| 320 | + $privileges[ ] = $privilege; |
|
| 321 | 321 | } |
| 322 | 322 | } |
| 323 | 323 | } |
@@ -372,7 +372,7 @@ discard block |
||
| 372 | 372 | |
| 373 | 373 | $hasRole = false; |
| 374 | 374 | |
| 375 | - $descendants = Cache::remember('domain_' . $domain->slug . '_descendants', 600, function () use ($domain) { |
|
| 375 | + $descendants = Cache::remember('domain_'.$domain->slug.'_descendants', 600, function() use ($domain) { |
|
| 376 | 376 | return $domain->findDescendants()->get(); |
| 377 | 377 | }); |
| 378 | 378 | |
@@ -396,9 +396,9 @@ discard block |
||
| 396 | 396 | */ |
| 397 | 397 | public function capabilitiesOnModule(Domain $domain, Module $module): Collection |
| 398 | 398 | { |
| 399 | - $keyName = 'user_' . $this->id . '_' . $domain->slug . '_' . $module->name . '_capabilities'; |
|
| 399 | + $keyName = 'user_'.$this->id.'_'.$domain->slug.'_'.$module->name.'_capabilities'; |
|
| 400 | 400 | |
| 401 | - return Cache::remember($keyName, 600, function () use ($domain, $module) { |
|
| 401 | + return Cache::remember($keyName, 600, function() use ($domain, $module) { |
|
| 402 | 402 | $capabilities = collect(); |
| 403 | 403 | |
| 404 | 404 | // Get the domain and all its parents |
@@ -449,9 +449,9 @@ discard block |
||
| 449 | 449 | $domain = Domain::first(); |
| 450 | 450 | } |
| 451 | 451 | |
| 452 | - $keyName = 'user_' . $this->id . '_' . $domain->slug . '_can_access_to_settings_panel'; |
|
| 452 | + $keyName = 'user_'.$this->id.'_'.$domain->slug.'_can_access_to_settings_panel'; |
|
| 453 | 453 | |
| 454 | - return Cache::remember($keyName, 600, function () use ($domain) { |
|
| 454 | + return Cache::remember($keyName, 600, function() use ($domain) { |
|
| 455 | 455 | |
| 456 | 456 | $hasCapability = false; |
| 457 | 457 | |
@@ -603,8 +603,8 @@ discard block |
||
| 603 | 603 | { |
| 604 | 604 | // Use cache |
| 605 | 605 | $allowedGroups = Cache::rememberForever( |
| 606 | - 'allowed_groups_for_' . ($this->is_admin ? 'admin' : $this->getKey()), |
|
| 607 | - function () { |
|
| 606 | + 'allowed_groups_for_'.($this->is_admin ? 'admin' : $this->getKey()), |
|
| 607 | + function() { |
|
| 608 | 608 | return $this->getAllowedGroupUuidsProcess(); |
| 609 | 609 | } |
| 610 | 610 | ); |
@@ -616,11 +616,11 @@ discard block |
||
| 616 | 616 | { |
| 617 | 617 | // Use cache |
| 618 | 618 | $allowedGroupsAndUsers = Cache::rememberForever( |
| 619 | - 'allowed_group_users_for_' . |
|
| 620 | - 'd_' . $domain->getKey() . '_' . |
|
| 621 | - ($addUsers ? 'u_' : '') . |
|
| 619 | + 'allowed_group_users_for_'. |
|
| 620 | + 'd_'.$domain->getKey().'_'. |
|
| 621 | + ($addUsers ? 'u_' : ''). |
|
| 622 | 622 | ($this->is_admin ? 'admin' : $this->getKey()), |
| 623 | - function () use ($domain, $addUsers) { |
|
| 623 | + function() use ($domain, $addUsers) { |
|
| 624 | 624 | return $this->getAllowedGroupsAndUsersProcess($domain, $addUsers); |
| 625 | 625 | } |
| 626 | 626 | ); |
@@ -630,16 +630,16 @@ discard block |
||
| 630 | 630 | |
| 631 | 631 | protected function getAllowedGroupUuidsProcess() |
| 632 | 632 | { |
| 633 | - $allowedUserUuids = collect([$this->uuid]); |
|
| 633 | + $allowedUserUuids = collect([ $this->uuid ]); |
|
| 634 | 634 | |
| 635 | 635 | if ($this->is_admin) { |
| 636 | 636 | $groups = Group::all(); |
| 637 | 637 | } else { |
| 638 | - $groups = []; |
|
| 639 | - $users = []; |
|
| 638 | + $groups = [ ]; |
|
| 639 | + $users = [ ]; |
|
| 640 | 640 | |
| 641 | 641 | foreach ($this->groups as $group) { |
| 642 | - $groups[$group->uuid] = $group; |
|
| 642 | + $groups[ $group->uuid ] = $group; |
|
| 643 | 643 | }; |
| 644 | 644 | |
| 645 | 645 | $this->addRecursiveChildrenGroups($groups, $users, $groups, false); |
@@ -648,7 +648,7 @@ discard block |
||
| 648 | 648 | } |
| 649 | 649 | |
| 650 | 650 | foreach ($groups as $uuid => $group) { |
| 651 | - $allowedUserUuids[] = $uuid; |
|
| 651 | + $allowedUserUuids[ ] = $uuid; |
|
| 652 | 652 | } |
| 653 | 653 | |
| 654 | 654 | return $allowedUserUuids; |
@@ -657,18 +657,18 @@ discard block |
||
| 657 | 657 | protected function addRecursiveChildrenGroups(&$groups, &$users, $searchGroups, $addUsers = false) |
| 658 | 658 | { |
| 659 | 659 | foreach ($searchGroups as $uuid => $searchGroup) { |
| 660 | - $searchChildrenGroups = []; |
|
| 660 | + $searchChildrenGroups = [ ]; |
|
| 661 | 661 | |
| 662 | 662 | foreach ($searchGroup->childrenGroups as $childrenGroup) { |
| 663 | - if (empty($groups[$childrenGroup->uuid])) { |
|
| 664 | - $groups[$childrenGroup->uuid] = $childrenGroup; |
|
| 665 | - $searchChildrenGroups[$childrenGroup->uuid] = $childrenGroup; |
|
| 663 | + if (empty($groups[ $childrenGroup->uuid ])) { |
|
| 664 | + $groups[ $childrenGroup->uuid ] = $childrenGroup; |
|
| 665 | + $searchChildrenGroups[ $childrenGroup->uuid ] = $childrenGroup; |
|
| 666 | 666 | } |
| 667 | 667 | |
| 668 | 668 | if ($addUsers) { |
| 669 | 669 | foreach ($childrenGroup->users as $user) { |
| 670 | - if (empty($users[$user->uuid])) { |
|
| 671 | - $users[$user->uuid] = $user; |
|
| 670 | + if (empty($users[ $user->uuid ])) { |
|
| 671 | + $users[ $user->uuid ] = $user; |
|
| 672 | 672 | } |
| 673 | 673 | } |
| 674 | 674 | } |
@@ -680,10 +680,10 @@ discard block |
||
| 680 | 680 | |
| 681 | 681 | protected function getAllowedGroupsAndUsersProcess(Domain $domain, $addUsers = true) |
| 682 | 682 | { |
| 683 | - $allowedUserUuids = collect([[ |
|
| 683 | + $allowedUserUuids = collect([ [ |
|
| 684 | 684 | 'uuid' => $this->uuid, |
| 685 | 685 | 'recordLabel' => uctrans('me', $this->module) |
| 686 | - ]]); |
|
| 686 | + ] ]); |
|
| 687 | 687 | |
| 688 | 688 | // if ($this->is_admin) { |
| 689 | 689 | $groups = Group::inDomain($domain)->orderBy('name')->get(); |
@@ -712,7 +712,7 @@ discard block |
||
| 712 | 712 | // } |
| 713 | 713 | |
| 714 | 714 | foreach ($groups as $uuid => $group) { |
| 715 | - $allowedUserUuids[] = [ |
|
| 715 | + $allowedUserUuids[ ] = [ |
|
| 716 | 716 | 'uuid' => $group->uuid, |
| 717 | 717 | 'recordLabel' => $group->recordLabel |
| 718 | 718 | ]; |
@@ -720,7 +720,7 @@ discard block |
||
| 720 | 720 | |
| 721 | 721 | foreach ($users as $uuid => $user) { |
| 722 | 722 | if ($user->getKey() != $this->getKey()) { |
| 723 | - $allowedUserUuids[] = [ |
|
| 723 | + $allowedUserUuids[ ] = [ |
|
| 724 | 724 | 'uuid' => $user->uuid, |
| 725 | 725 | 'recordLabel' => $user->recordLabel |
| 726 | 726 | ]; |