Here is the list of the most complex expressions used in the code. A complex expression is an expression that requires more than 20 tokens to be build.
Literal arrays are omitted.
File | Count | Expression |
---|---|---|
/src/Console/IdeHelperCommand.php:174 | 1 | str_replace(['{grid}', '{show}', '{form}', '{grid-column}', '{grid-filter}', '{show-column}', ], [$this->generate('grid', $fields), $this->generate('show', $fields), $this->generateFormFields( ), $this->generateGridColumns( ), $this->generateGridFilters( ), $this->generateShowFields( ), ], File::get($this->getStub( ))) |
/src/Form/Field.php:1135 | 1 | array_merge($this->variables, ['id' => $this->id, 'name' => $this->getElementName( ), 'help' => $this->help, 'class' => $this->getElementClassString( ), 'value' => $this->value( ), 'label' => $this->label, 'viewClass' => $this->getViewElementClasses( ), 'column' => $this->column, 'errorKey' => $this->getErrorKey( ), 'attributes' => $this->formatAttributes( ), 'placeholder' => $this->placeholder( ), 'disabled' => $this->attributes['disabled'] ?? false, 'formId' => $this->getFormElementId( ), ]) |
/src/Grid/Filter/AbstractFilter.php:597 | 1 | array_merge(['id' => $this->id, 'name' => $this->formatName($this->column), 'label' => $this->label, 'value' => $value ?: $this->defaultValue, 'presenter' => $this->presenter( ), 'width' => $this->width, 'style' => $this->style, ], $variables) |
/src/Widgets/Form.php:590 | 1 | array_merge(['start' => $this->open( ), 'end' => $this->close( ), 'fields' => $this->fields, 'method' => $this->getHtmlAttribute('method'), 'buttons' => $this->buttons, 'rows' => $this->rows( ), 'layout' => $this->layout, ], $this->variables) |
/src/Console/ExportSeedCommand.php:57 | 1 | array_merge($replaces, ['ClassUsers' => config('admin.database.users_model'), 'TableRoleUsers' => config('admin.database.role_users_table'), 'TablePermissionsUsers' => config('admin.database.user_permissions_table'), 'ArrayUsers' => $this->getTableDataArrayAsString(config('admin.database.users_table'), $exceptFields), 'ArrayPivotRoleUsers' => $this->getTableDataArrayAsString(config('admin.database.role_users_table'), $exceptFields), 'ArrayPivotPermissionsUsers' => $this->getTableDataArrayAsString(config('admin.database.user_permissions_table'), $exceptFields), ]) |
/src/Grid/Filter/Between.php:150 | 1 | $script = <<<JS $('#{$this->id['start']}').datetimepicker($startOptions); $('#{$this->id['end']}').datetimepicker($endOptions); $("#{$this->id['start']}").on("dp.change", function (e) { $('#{$this->id['end']}').data("DateTimePicker").minDate(e.date); }); $("#{$this->id['end']}").on("dp.change", function (e) { $('#{$this->id['start']}').data("DateTimePicker").maxDate(e.date); }); JS |
/src/Traits/ModelTree.php:223 | 1 | $swapWithModel = $this->buildSortQuery( )->limit(1)->ordered('desc')->where($orderColumnName, '<', $this->$orderColumnName)->where($parentColumnName, $this->$parentColumnName)->first( ) |
/src/Traits/ModelTree.php:204 | 1 | $swapWithModel = $this->buildSortQuery( )->limit(1)->ordered( )->where($orderColumnName, '>', $this->$orderColumnName)->where($parentColumnName, $this->$parentColumnName)->first( ) |
/src/Console/IdeHelperCommand.php:174 | 1 | $content = str_replace(['{grid}', '{show}', '{form}', '{grid-column}', '{grid-filter}', '{show-column}', ], [$this->generate('grid', $fields), $this->generate('show', $fields), $this->generateFormFields( ), $this->generateGridColumns( ), $this->generateGridFilters( ), $this->generateShowFields( ), ], File::get($this->getStub( ))) |
/src/Console/ExportSeedCommand.php:57 | 1 | $replaces = array_merge($replaces, ['ClassUsers' => config('admin.database.users_model'), 'TableRoleUsers' => config('admin.database.role_users_table'), 'TablePermissionsUsers' => config('admin.database.user_permissions_table'), 'ArrayUsers' => $this->getTableDataArrayAsString(config('admin.database.users_table'), $exceptFields), 'ArrayPivotRoleUsers' => $this->getTableDataArrayAsString(config('admin.database.role_users_table'), $exceptFields), 'ArrayPivotPermissionsUsers' => $this->getTableDataArrayAsString(config('admin.database.user_permissions_table'), $exceptFields), ]) |
/src/Console/ExportSeedCommand.php:38 | 1 | $replaces = ['DummyClass' => $name, 'ClassMenu' => config('admin.database.menu_model'), 'ClassPermission' => config('admin.database.permissions_model'), 'ClassRole' => config('admin.database.roles_model'), 'TableRoleMenu' => config('admin.database.role_menu_table'), 'TableRolePermissions' => config('admin.database.role_permissions_table'), 'ArrayMenu' => $this->getTableDataArrayAsString(config('admin.database.menu_table'), $exceptFields), 'ArrayPermission' => $this->getTableDataArrayAsString(config('admin.database.permissions_table'), $exceptFields), 'ArrayRole' => $this->getTableDataArrayAsString(config('admin.database.roles_table'), $exceptFields), 'ArrayPivotRoleMenu' => $this->getTableDataArrayAsString(config('admin.database.role_menu_table'), $exceptFields), 'ArrayPivotRolePermissions' => $this->getTableDataArrayAsString(config('admin.database.role_permissions_table'), $exceptFields), ] |
/src/Show/Panel.php:59 | 1 | $this->data = ['fields' => new Collection( ), 'tools' => new Tools($this), 'rows' => $this->parent->rows( ), 'style' => 'default', 'title' => trans('admin.detail'), ] |
/src/Controllers/ScaffoldController.php:138 | 1 | $paths['migration'] = (new MigrationCreator(app('files')))->buildBluePrint($request->get('fields'), $request->get('primary_key', 'id'), $request->get('timestamps') == 1, $request->get('soft_deletes') == 1)->create($migrationName, database_path('migrations'), $table) |
/src/Controllers/ExtensionController.php:40 | 1 | $box = Alert::make( )->title("<span>php artisan admin:import $extension</span>")->content(Terminal::call('admin:import', ['extension' => $extension, '--force' => '1'])->transparent( ))->success( )->removable( ) |
/src/Middleware/Pjax.php:73 | 1 | $error = new MessageBag(['type' => get_class($exception), 'message' => $exception->getMessage( ), 'file' => $exception->getFile( ), 'line' => $exception->getLine( ), ]) |
/src/Middleware/LogOperation.php:26 | 1 | $log = ['user_id' => $user ? $user->id : 0, 'path' => substr($request->path( ), 0, 255), 'method' => $request->method( ), 'ip' => $request->getClientIp( ), 'input' => $this->formatInput($request->input( )), ] |
/src/Grid/Displayers/Tree.php:61 | 1 | $showNextPage = $model->getCurrentChildrenPage( ) < $model->paginator( )->lastPage( ) && $model->buildData( )->count( ) == $model->getPerPage( ) |
/src/Grid/Displayers/Tree.php:23 | 1 | $script = <<<JS Dcat.grid.Tree({ button: '.{$tableId}-grid-load-children', table: '#{$tableId}', url: '{$model->generateTreeUrl( )}', perPage: '{$model->getPerPage( )}', showNextPage: {$showNextPage}, pageQueryName: '{$pageName}', parentIdQueryName: '{$model->getParentIdQueryName( )}', tierQueryName: '{$model->getTierQueryName( )}', }); JS |
/src/Grid/Tools/QuickSearch.php:120 | 1 | $data = ['action' => $this->formAction( ), 'key' => $this->queryName, 'value' => $this->value( ), 'placeholder' => $this->placeholder ?: trans('admin.search'), 'width' => $this->width, 'auto' => $this->autoSubmit, ] |
/src/Grid/Tools/FilterButton.php:155 | 1 | $variables = ['scopes' => $scopres, 'current_label' => $this->currentScopeLabel( ), 'url_no_scopes' => $filter->urlWithoutScopes( ), 'btn_class' => $this->getElementClassName( ), 'expand' => $filter->expand, 'show_filter_text' => true, 'only_scopes' => $onlyScopes, 'valueCount' => $valueCount, ] |
/src/Form/Field/SelectResource.php:176 | 1 | $this->script = <<<JS Dcat.ResourceSelector({ title: '{$label}', column: "{$this->getElementName( )}", source: '{$this->source}', selector: replaceNestedFormIndex('#{$this->btnId}'), maxItem: {$maxItem}, area: {$area}, queryName: '{$queryName}', items: {$this->value( )}, placeholder: '{$this->placeholder( )}', showCloseButton: false, disabled: '{$disabled}', displayer: 'default', displayerContainer: $(replaceNestedFormIndex('{$displayerContainer}')), }); JS |
/src/Form/Field/Map.php:210 | 1 | $this->script = <<<JS (function() { function initBaiduMap(name) { var lat = $('#{$this->id['lat']}'); var lng = $('#{$this->id['lng']}'); var map = new BMap.Map("map_"+name); var point = new BMap.Point(lng.val(), lat.val()); map.centerAndZoom(point, 15); map.enableScrollWheelZoom(true); var marker = new BMap.Marker(point); map.addOverlay(marker); marker.enableDragging(); if( ! lat.val() || ! lng.val()) { var geolocation = new BMap.Geolocation(); geolocation.getCurrentPosition(function(e){ if(this.getStatus() == BMAP_STATUS_SUCCESS){ map.panTo(e.point); marker.setPosition(e.point); lat.val(e.point.lat); lng.val(e.point.lng); } else { console.log('failed'+this.getStatus()); } },{enableHighAccuracy: true}) } map.addEventListener("click", function(e){ marker.setPosition(e.point); lat.val(e.point.lat); lng.val(e.point.lng); }); marker.addEventListener("dragend", function(e){ lat.val(e.point.lat); lng.val(e.point.lng); }); var ac = new BMap.Autocomplete( {"input" : "search-{$this->id['lat']}{$this->id['lng']}" ,"location" : map }); var address; ac.addEventListener("onconfirm", function(e) { //鼠标点击下拉列表后的事件 var _value = e.item.value; address = _value.province + _value.city + _value.district + _value.street + _value.business; setPlace(); }); function setPlace(){ function myFun(){ var pp = local.getResults().getPoi(0).point; map.centerAndZoom(pp, 15); marker.setPosition(pp); lat.val(pp.lat); lng.val(pp.lng); } var local = new BMap.LocalSearch(map, { onSearchComplete: myFun }); local.search(address); } } initBaiduMap('{$this->id['lat']}{$this->id['lng']}'); })() JS |
/src/Form/Field/WebUploader.php:179 | 1 | $defaultOptions = ['name' => WebUploaderHelper::FILE_NAME, 'fileVal' => WebUploaderHelper::FILE_NAME, 'isImage' => false, 'disableRemove' => false, 'chunked' => true, 'fileNumLimit' => 10, 'disableGlobalDnd' => true, 'fileSizeLimit' => 20971520000, 'fileSingleSizeLimit' => 10485760, 'elementName' => $this->getElementName( ), 'lang' => trans('admin.uploader'), 'deleteData' => [static::FILE_DELETE_FLAG => '', '_token' => csrf_token( ), ], 'formData' => ['_id' => Str::random( ), '_token' => csrf_token( ), 'upload_column' => $this->column( ), ], ] |
/src/Form/Field/Listbox.php:26 | 1 | $settings = array_merge($this->settings, ['infoText' => trans('admin.listbox.text_total'), 'infoTextEmpty' => trans('admin.listbox.text_empty'), 'infoTextFiltered' => trans('admin.listbox.filtered'), 'filterTextClear' => trans('admin.listbox.filter_clear'), 'filterPlaceHolder' => trans('admin.listbox.filter_placeholder'), ]) |
/src/Form/Field/HasMany.php:584 | 1 | $script = <<<JS (function () { var nestedIndex = 0; {$this->makeReplaceNestedIndexScript( )} $('{$this->getContainerElementSelector( )}').on('click', '.add', function () { var tpl = $('template.{$this->column}-tpl'); nestedIndex++; var template = replaceNestedFormIndex(tpl.html()); $('.has-many-{$this->column}-forms').append(template); {$templateScript} }); $('{$this->getContainerElementSelector( )}').on('click', '.remove', function () { $(this).closest('.has-many-{$this->column}-form').hide(); $(this).closest('.has-many-{$this->column}-form').find('.$removeClass').val(1); }); })(); JS |
/src/Form/Field/Text.php:78 | 1 | $attributes = ['data-match' => '#' . $field->getElementId( ), 'data-match-error' => str_replace([':attribute', ':other'], [$field->label( ), $this->label( )], $error ?: trans('admin.validation.match')), ] |
/src/Form/Field/HasMany.php:482 | 1 | $script = <<<JS (function () { var nestedIndex = 0; {$this->makeReplaceNestedIndexScript( )} $('{$this->getContainerElementSelector( )}').on('click', '.add', function () { var tpl = $('template.{$this->column}-tpl'); nestedIndex++; var template = replaceNestedFormIndex(tpl.html()); $('.has-many-{$this->column}-forms').append(template); {$templateScript} }); $('{$this->getContainerElementSelector( )}').on('click', '.remove', function () { $(this).closest('.has-many-{$this->column}-form').hide(); $(this).closest('.has-many-{$this->column}-form').find('.$removeClass').val(1); }); })() JS |
/src/Form/Field/HasMany.php:520 | 1 | $script = <<<JS (function () { $('{$this->getContainerElementSelector( )} > .nav').off('click', 'i.close-tab').on('click', 'i.close-tab', function(){ var \$navTab = $(this).siblings('a'); var \$pane = $(\$navTab.attr('href')); if( \$pane.hasClass('new') ){ \$pane.remove(); }else{ \$pane.removeClass('active').find('.$removeClass').val(1); } if(\$navTab.closest('li').hasClass('active')){ \$navTab.closest('li').remove(); $('{$this->getContainerElementSelector( )} > .nav > li:nth-child(1) > a').click(); }else{ \$navTab.closest('li').remove(); } }); {$this->makeReplaceNestedIndexScript( )} var nestedIndex = 0; $('{$this->getContainerElementSelector( )} > .header').off('click', '.add').on('click', '.add', function(){ nestedIndex++; var navTabHtml = replaceNestedFormIndex($('{$this->getContainerElementSelector( )} > template.nav-tab-tpl').html()); var paneHtml = replaceNestedFormIndex($('{$this->getContainerElementSelector( )} > template.pane-tpl').html()); $('{$this->getContainerElementSelector( )} > .nav').append(navTabHtml); $('{$this->getContainerElementSelector( )} > .tab-content').append(paneHtml); $('{$this->getContainerElementSelector( )} > .nav > li:last-child a').click(); {$templateScript} }); if ($('.has-error').length) { $('.has-error').parent('.tab-pane').each(function () { var tabId = '#'+$(this).attr('id'); $('li a[href="'+tabId+'"] i').removeClass('d-none'); }); var first = $('.has-error:first').parent().attr('id'); $('li a[href="#'+first+'"]').tab('show'); } })(); JS |
/src/Actions/HasActionHandler.php:81 | 1 | $script = <<<JS Dcat.Action({ selector: '{$this->selector( )}', event: '{$this->event}', method: '{$this->method( )}', key: '{$this->getKey( )}', url: '{$this->handlerRoute( )}', data: {$data}, confirm: {$confirm}, calledClass: '{$this->makeCalledClass( )}', before: {$this->actionScript( )}, html: {$this->handleHtmlResponse( )}, success: {$this->resolverScript( )}, error: {$this->rejectScript( )}, }); JS |
/src/Repositories/EloquentRepository.php:500 | 1 | $this->collection = $query->with($this->getRelations( ))->findOrFail(collect(explode(',', $id))->filter( )->toArray( ), $this->getFormColumns( )) |
/src/Exception/Handler.php:28 | 1 | $error = new MessageBag(['type' => get_class($exception), 'message' => $exception->getMessage( ), 'file' => $exception->getFile( ), 'line' => $exception->getLine( ), 'trace' => $this->replaceBasePath($exception->getTraceAsString( )), ]) |
/src/Form/Field/BootstrapUploadField.php:76 | 1 | $defaultOptions = ['overwriteInitial' => false, 'initialPreviewAsData' => true, 'browseLabel' => trans('admin.browse'), 'showRemove' => false, 'showUpload' => false, 'dropZoneEnabled' => false, 'deleteExtraData' => [$this->formatName($this->column) => static::FILE_DELETE_FLAG, static::FILE_DELETE_FLAG => '', '_token' => csrf_token( ), '_method' => 'PUT', ], ] |
/src/Scaffold/ModelCreator.php:73 | 1 | $stub = $this->replaceClass($stub, $this->name)->replaceNamespace($stub, $this->name)->replaceSoftDeletes($stub, $softDeletes)->replaceDatetimeFormatter($stub)->replaceTable($stub, $this->name)->replaceTimestamp($stub, $timestamps)->replacePrimaryKey($stub, $keyName)->replaceSpace($stub) |
/src/Widgets/Dump.php:86 | 1 | if(is_string($content) && ((mb_strpos($content, '{') === 0 && mb_strpos($content, '}', -1) !== false) || (mb_strpos($content, '[') === 0 && mb_strpos($content, ']', -1) !== false))) { /**/ } |
/src/Grid/Concerns/HasTools.php:204 | 1 | if($this->option('show_toolbar') && ($this->tools( )->has( ) || $this->allowExporter( ) || $this->allowCreateButton( ) || $this->allowResponsive( ) || !empty($this->variables['title']))) { /**/ } |