diff --git a/config/admin.php b/config/admin.php index aa287af0c939273b0c64e5364b5812033951bfca..66ca4c1b5c7f77b83013133db08c35a066cca662 100755 --- a/config/admin.php +++ b/config/admin.php @@ -136,7 +136,7 @@ return [ 'guards' => [ 'admin' => [ - 'driver' => 'session', + 'driver' => 'session', 'provider' => 'admin', ], ], @@ -144,7 +144,7 @@ return [ 'providers' => [ 'admin' => [ 'driver' => 'eloquent', - 'model' => Dcat\Admin\Models\Administrator::class, + 'model' => Dcat\Admin\Models\Administrator::class, ], ], @@ -235,7 +235,7 @@ return [ 'cache' => [ // enable cache or not 'enable' => false, - 'store' => 'file', + 'store' => 'file', ], // Whether enable menu bind to a permission. @@ -267,7 +267,7 @@ return [ // Image and file upload path under the disk above. 'directory' => [ 'image' => 'images', - 'file' => 'files', + 'file' => 'files', ], ], @@ -302,12 +302,12 @@ return [ 'menu_model' => Dcat\Admin\Models\Menu::class, // Pivot table for table above. - 'role_users_table' => 'admin_role_users', + 'role_users_table' => 'admin_role_users', 'role_permissions_table' => 'admin_role_permissions', - 'role_menu_table' => 'admin_role_menu', - 'permission_menu_table' => 'admin_permission_menu', - 'settings_table' => 'admin_settings', - 'extensions_table' => 'admin_extensions', + 'role_menu_table' => 'admin_role_menu', + 'permission_menu_table' => 'admin_permission_menu', + 'settings_table' => 'admin_settings', + 'extensions_table' => 'admin_extensions', 'extension_histories_table' => 'admin_extension_histories', ], diff --git a/resources/lang/en/admin.php b/resources/lang/en/admin.php index 66a1f7efad501e4420fdaf743853f689e4d4bc22..09b9e0364141af45ea72b7f18f79b9d5ed203fca 100755 --- a/resources/lang/en/admin.php +++ b/resources/lang/en/admin.php @@ -2,226 +2,226 @@ return [ 'scaffold' => [ - 'header' => 'Scaffold', - 'choose' => 'choose', - 'table' => 'Table', - 'model' => 'Model', - 'controller' => 'Controller', - 'repository' => 'Repository', - 'add_field' => 'Add field', - 'pk' => 'Primary key', - 'soft_delete' => 'Soft delete', - 'create_migration' => 'Create migration', - 'create_model' => 'Create model', + 'header' => 'Scaffold', + 'choose' => 'choose', + 'table' => 'Table', + 'model' => 'Model', + 'controller' => 'Controller', + 'repository' => 'Repository', + 'add_field' => 'Add field', + 'pk' => 'Primary key', + 'soft_delete' => 'Soft delete', + 'create_migration' => 'Create migration', + 'create_model' => 'Create model', 'create_repository' => 'Create repository', 'create_controller' => 'Create controller', - 'run_migrate' => 'Run migrate', - 'create_lang' => 'Create lang', - 'field' => 'field', - 'translation' => 'translation', - 'comment' => 'comment', - 'default' => 'default', - 'field_name' => 'field name', - 'type' => 'type', - 'nullable' => 'nullable', - 'key' => 'key', - 'translate_title' => 'Translate Title', + 'run_migrate' => 'Run migrate', + 'create_lang' => 'Create lang', + 'field' => 'field', + 'translation' => 'translation', + 'comment' => 'comment', + 'default' => 'default', + 'field_name' => 'field name', + 'type' => 'type', + 'nullable' => 'nullable', + 'key' => 'key', + 'translate_title' => 'Translate Title', 'sync_translation_with_comment' => 'Sync translation and comment', ], 'client' => [ - 'delete_confirm' => 'Are you sure to delete this item ?', - 'confirm' => 'Confirm', - 'cancel' => 'Cancel', + 'delete_confirm' => 'Are you sure to delete this item ?', + 'confirm' => 'Confirm', + 'cancel' => 'Cancel', 'refresh_succeeded' => 'Refresh succeeded !', - 'close' => 'Close', - 'selected_options' => ':num options selected', - 'exceed_max_item' => 'Maximum items exceeded.', - 'no_preview' => 'No preview available.', + 'close' => 'Close', + 'selected_options' => ':num options selected', + 'exceed_max_item' => 'Maximum items exceeded.', + 'no_preview' => 'No preview available.', '500' => 'Internal server error !', '403' => 'Permission deny !', '401' => 'Unauthorized !', '419' => 'Page expired !', ], - 'online' => 'Online', - 'login' => 'Login', - 'logout' => 'Logout', - 'setting' => 'Setting', - 'name' => 'Name', - 'username' => 'Username', - 'user' => 'User', - 'alias' => 'Alias', - 'routes' => 'Routes', - 'route_action' => 'Route Action', - 'middleware' => 'Middleware', - 'method' => 'Method', - 'old_password' => 'Old password', - 'password' => 'Password', + 'online' => 'Online', + 'login' => 'Login', + 'logout' => 'Logout', + 'setting' => 'Setting', + 'name' => 'Name', + 'username' => 'Username', + 'user' => 'User', + 'alias' => 'Alias', + 'routes' => 'Routes', + 'route_action' => 'Route Action', + 'middleware' => 'Middleware', + 'method' => 'Method', + 'old_password' => 'Old password', + 'password' => 'Password', 'password_confirmation' => 'Password confirmation', - 'old_password_error' => 'Incorrect password', - 'remember_me' => 'Remember me', - 'user_setting' => 'User setting', - 'avatar' => 'Avatar', - 'list' => 'List', - 'new' => 'New', - 'create' => 'Create', - 'delete' => 'Delete', - 'remove' => 'Remove', - 'edit' => 'Edit', - 'quick_edit' => 'Quick Edit', - 'view' => 'View', - 'continue_editing' => 'Continue editing', - 'continue_creating' => 'Continue creating', - 'detail' => 'Detail', - 'browse' => 'Browse', - 'reset' => 'Reset', - 'export' => 'Export', - 'batch_delete' => 'Batch delete', - 'save' => 'Save', - 'refresh' => 'Refresh', - 'order' => 'Order', - 'expand' => 'Expand', - 'collapse' => 'Collapse', - 'filter' => 'Filter', - 'search' => 'Search', - 'close' => 'Close', - 'show' => 'Show', - 'entries' => 'entries', - 'captcha' => 'Captcha', - 'action' => 'Action', - 'title' => 'Title', - 'description' => 'Description', - 'back' => 'Back', - 'back_to_list' => 'Back to List', - 'submit' => 'Submit', - 'menu' => 'Menu', - 'input' => 'Input', - 'succeeded' => 'Succeeded', - 'failed' => 'Failed', - 'delete_confirm' => 'Are you sure to delete this item ?', - 'delete_succeeded' => 'Delete succeeded !', - 'delete_failed' => 'Delete failed !', - 'update_succeeded' => 'Update succeeded !', - 'update_failed' => 'Update failed !', - 'save_succeeded' => 'Save succeeded !', - 'save_failed' => 'Save failed !', - 'refresh_succeeded' => 'Refresh succeeded !', - 'login_successful' => 'Login successful', - 'choose' => 'Choose', - 'choose_file' => 'Select file', - 'choose_image' => 'Select image', - 'more' => 'More', - 'deny' => 'Permission denied', - 'administrator' => 'Administrator', - 'no_data' => 'No data.', - 'roles' => 'Roles', - 'permissions' => 'Permissions', - 'slug' => 'Slug', - 'created_at' => 'Created At', - 'updated_at' => 'Updated At', - 'alert' => 'Alert', - 'parent_id' => 'Parent', - 'icon' => 'Icon', - 'uri' => 'URI', - 'operation_log' => 'Operation log', - 'parent_select_error' => 'Parent select error', - 'tree' => 'Tree', - 'table' => 'Table', - 'default' => 'Default', - 'import' => 'Import', - 'is_not_import' => 'No', - 'selected_options' => ':num options selected', - 'pagination' => [ + 'old_password_error' => 'Incorrect password', + 'remember_me' => 'Remember me', + 'user_setting' => 'User setting', + 'avatar' => 'Avatar', + 'list' => 'List', + 'new' => 'New', + 'create' => 'Create', + 'delete' => 'Delete', + 'remove' => 'Remove', + 'edit' => 'Edit', + 'quick_edit' => 'Quick Edit', + 'view' => 'View', + 'continue_editing' => 'Continue editing', + 'continue_creating' => 'Continue creating', + 'detail' => 'Detail', + 'browse' => 'Browse', + 'reset' => 'Reset', + 'export' => 'Export', + 'batch_delete' => 'Batch delete', + 'save' => 'Save', + 'refresh' => 'Refresh', + 'order' => 'Order', + 'expand' => 'Expand', + 'collapse' => 'Collapse', + 'filter' => 'Filter', + 'search' => 'Search', + 'close' => 'Close', + 'show' => 'Show', + 'entries' => 'entries', + 'captcha' => 'Captcha', + 'action' => 'Action', + 'title' => 'Title', + 'description' => 'Description', + 'back' => 'Back', + 'back_to_list' => 'Back to List', + 'submit' => 'Submit', + 'menu' => 'Menu', + 'input' => 'Input', + 'succeeded' => 'Succeeded', + 'failed' => 'Failed', + 'delete_confirm' => 'Are you sure to delete this item ?', + 'delete_succeeded' => 'Delete succeeded !', + 'delete_failed' => 'Delete failed !', + 'update_succeeded' => 'Update succeeded !', + 'update_failed' => 'Update failed !', + 'save_succeeded' => 'Save succeeded !', + 'save_failed' => 'Save failed !', + 'refresh_succeeded' => 'Refresh succeeded !', + 'login_successful' => 'Login successful', + 'choose' => 'Choose', + 'choose_file' => 'Select file', + 'choose_image' => 'Select image', + 'more' => 'More', + 'deny' => 'Permission denied', + 'administrator' => 'Administrator', + 'no_data' => 'No data.', + 'roles' => 'Roles', + 'permissions' => 'Permissions', + 'slug' => 'Slug', + 'created_at' => 'Created At', + 'updated_at' => 'Updated At', + 'alert' => 'Alert', + 'parent_id' => 'Parent', + 'icon' => 'Icon', + 'uri' => 'URI', + 'operation_log' => 'Operation log', + 'parent_select_error' => 'Parent select error', + 'tree' => 'Tree', + 'table' => 'Table', + 'default' => 'Default', + 'import' => 'Import', + 'is_not_import' => 'No', + 'selected_options' => ':num options selected', + 'pagination' => [ 'range' => 'Showing :first to :last of :total entries', ], - 'role' => 'Role', - 'permission' => 'Permission', - 'route' => 'Route', - 'confirm' => 'Confirm', - 'cancel' => 'Cancel', - 'selectall' => 'Select all', - 'http' => [ + 'role' => 'Role', + 'permission' => 'Permission', + 'route' => 'Route', + 'confirm' => 'Confirm', + 'cancel' => 'Cancel', + 'selectall' => 'Select all', + 'http' => [ 'method' => 'HTTP method', - 'path' => 'HTTP path', + 'path' => 'HTTP path', ], - 'all_methods_if_empty' => 'All methods if empty', - 'all' => 'All', - 'current_page' => 'Current page', - 'selected_rows' => 'Selected rows', - 'upload' => 'Upload', - 'new_folder' => 'New folder', - 'time' => 'Time', - 'size' => 'Size', - 'between_start' => 'Start', - 'between_end' => 'End', - 'next_page' => 'Next', - 'prev_page' => 'Previous', - 'next_step' => 'Next', - 'prev_step' => 'Previous', - 'done' => 'Done', - 'listbox' => [ - 'text_total' => 'Showing all {0}', - 'text_empty' => 'Empty list', - 'filtered' => '{0} / {1}', - 'filter_clear' => 'Show all', + 'all_methods_if_empty' => 'All methods if empty', + 'all' => 'All', + 'current_page' => 'Current page', + 'selected_rows' => 'Selected rows', + 'upload' => 'Upload', + 'new_folder' => 'New folder', + 'time' => 'Time', + 'size' => 'Size', + 'between_start' => 'Start', + 'between_end' => 'End', + 'next_page' => 'Next', + 'prev_page' => 'Previous', + 'next_step' => 'Next', + 'prev_step' => 'Previous', + 'done' => 'Done', + 'listbox' => [ + 'text_total' => 'Showing all {0}', + 'text_empty' => 'Empty list', + 'filtered' => '{0} / {1}', + 'filter_clear' => 'Show all', 'filter_placeholder' => 'Filter', ], 'responsive' => [ 'display_all' => 'Display all', - 'display' => 'Display', - 'focus' => 'Focus', + 'display' => 'Display', + 'focus' => 'Focus', ], 'uploader' => [ - 'add_new_media' => 'Browse', - 'drag_file' => 'Or drag file here', - 'max_file_limit' => 'The :attribute may not be greater than :max.', - 'exceed_size' => 'Exceeds the maximum file-size', - 'interrupt' => 'Interrupt', - 'upload_failed' => 'Upload failed! Please try again.', - 'selected_files' => ':num files selected,size: :size。', - 'selected_has_failed' => 'Uploaded: :success, failed: :fail, retry or ignore', - 'selected_success' => ':num(:size) files selected, Uploaded: :success.', - 'dot' => ', ', - 'failed_num' => 'failed::fail.', - 'pause_upload' => 'Pause', - 'go_on_upload' => 'Go On', - 'start_upload' => 'Upload', + 'add_new_media' => 'Browse', + 'drag_file' => 'Or drag file here', + 'max_file_limit' => 'The :attribute may not be greater than :max.', + 'exceed_size' => 'Exceeds the maximum file-size', + 'interrupt' => 'Interrupt', + 'upload_failed' => 'Upload failed! Please try again.', + 'selected_files' => ':num files selected,size: :size。', + 'selected_has_failed' => 'Uploaded: :success, failed: :fail, retry or ignore', + 'selected_success' => ':num(:size) files selected, Uploaded: :success.', + 'dot' => ', ', + 'failed_num' => 'failed::fail.', + 'pause_upload' => 'Pause', + 'go_on_upload' => 'Go On', + 'start_upload' => 'Upload', 'upload_success_message' => ':success files uploaded successfully', - 'go_on_add' => 'New File', - 'Q_TYPE_DENIED' => 'Sorry, the type of this file is not allowed!', - 'Q_EXCEED_NUM_LIMIT' => 'Sorry, maximum number of allowable file uploads has been exceeded!', - 'F_EXCEED_SIZE' => 'Sorry,the maximum file-size has been exceeded!', - 'Q_EXCEED_SIZE_LIMIT' => 'Sorry, the maximum file-size has been exceeded!', - 'F_DUPLICATE' => 'Duplicate file.', - 'confirm_delete_file' => 'Are you sure delete this file from server?', - 'dimensions' => 'The image dimensions is invalid.', + 'go_on_add' => 'New File', + 'Q_TYPE_DENIED' => 'Sorry, the type of this file is not allowed!', + 'Q_EXCEED_NUM_LIMIT' => 'Sorry, maximum number of allowable file uploads has been exceeded!', + 'F_EXCEED_SIZE' => 'Sorry,the maximum file-size has been exceeded!', + 'Q_EXCEED_SIZE_LIMIT' => 'Sorry, the maximum file-size has been exceeded!', + 'F_DUPLICATE' => 'Duplicate file.', + 'confirm_delete_file' => 'Are you sure delete this file from server?', + 'dimensions' => 'The image dimensions is invalid.', ], - 'import_extension_confirm' => 'Are you sure import the extension?', - 'quick_create' => 'Quick create', - 'grid_items_selected' => '{n} items selected', - 'nothing_updated' => 'Nothing has been updated.', - 'welcome_back' => 'Welcome back, please login to your account.', - 'documentation' => 'Documentation', - 'demo' => 'Demo', - 'extensions' => 'Extensions', - 'version' => 'Version', - 'current_version' => 'Current version', - 'latest_version' => 'Latest version', - 'upgrade_to_version' => 'Upgrade to version :version', - 'enable' => 'Enable', - 'disable' => 'Disable', - 'uninstall' => 'Uninstall', - 'confirm_uninstall' => 'Please confirm that you wish to uninstall this extension. This may result in potential data loss.', - 'marketplace' => 'Marketplace', - 'theme' => 'Theme', - 'application' => 'Application', - 'install_from_local' => 'Install From Local', - 'install_succeeded' => 'Install succeeded !', + 'import_extension_confirm' => 'Are you sure import the extension?', + 'quick_create' => 'Quick create', + 'grid_items_selected' => '{n} items selected', + 'nothing_updated' => 'Nothing has been updated.', + 'welcome_back' => 'Welcome back, please login to your account.', + 'documentation' => 'Documentation', + 'demo' => 'Demo', + 'extensions' => 'Extensions', + 'version' => 'Version', + 'current_version' => 'Current version', + 'latest_version' => 'Latest version', + 'upgrade_to_version' => 'Upgrade to version :version', + 'enable' => 'Enable', + 'disable' => 'Disable', + 'uninstall' => 'Uninstall', + 'confirm_uninstall' => 'Please confirm that you wish to uninstall this extension. This may result in potential data loss.', + 'marketplace' => 'Marketplace', + 'theme' => 'Theme', + 'application' => 'Application', + 'install_from_local' => 'Install From Local', + 'install_succeeded' => 'Install succeeded !', 'invalid_extension_package' => 'Invalid extension package !', - 'copied' => 'Copied', - 'auth_failed' => 'These credentials do not match our records.', - 'validation' => [ - 'match' => 'The :attribute and :other must match.', + 'copied' => 'Copied', + 'auth_failed' => 'These credentials do not match our records.', + 'validation' => [ + 'match' => 'The :attribute and :other must match.', 'minlength' => 'The :attribute must be at least :min characters.', 'maxlength' => 'The :attribute may not be greater than :max characters.', ], diff --git a/resources/lang/zh_CN/admin.php b/resources/lang/zh_CN/admin.php index 142a0da54e44c0d1fafbba5b08c177fb77dd0a09..62d37509c842c4411fe44e538d86009716a69f36 100644 --- a/resources/lang/zh_CN/admin.php +++ b/resources/lang/zh_CN/admin.php @@ -2,227 +2,227 @@ return [ 'scaffold' => [ - 'header' => '代码生成器', - 'choose' => '选择已有数据表', - 'table' => '表名', - 'model' => '模型', - 'controller' => '控制器', - 'repository' => '数据仓库', - 'add_field' => '添加字段', - 'pk' => '主键', - 'soft_delete' => '软删除', - 'create_migration' => '创建表迁移文件', - 'create_model' => '创建模型', + 'header' => '代码生成器', + 'choose' => '选择已有数据表', + 'table' => '表名', + 'model' => '模型', + 'controller' => '控制器', + 'repository' => '数据仓库', + 'add_field' => '添加字段', + 'pk' => '主键', + 'soft_delete' => '软删除', + 'create_migration' => '创建表迁移文件', + 'create_model' => '创建模型', 'create_repository' => '创建数据仓库', 'create_controller' => '创建控制器', - 'run_migrate' => '执行迁移文件', - 'create_lang' => '创建翻译文件', - 'field' => '字段', - 'translation' => '翻译', - 'comment' => '注释', - 'default' => '默认值', - 'field_name' => '字段名', - 'type' => '类型', - 'nullable' => '允许空值', - 'key' => '索引', - 'translate_title' => '翻译标题', + 'run_migrate' => '执行迁移文件', + 'create_lang' => '创建翻译文件', + 'field' => '字段', + 'translation' => '翻译', + 'comment' => '注释', + 'default' => '默认值', + 'field_name' => '字段名', + 'type' => '类型', + 'nullable' => '允许空值', + 'key' => '索引', + 'translate_title' => '翻译标题', 'sync_translation_with_comment' => '同步翻译与注释', ], 'client' => [ - 'delete_confirm' => '确认删除?', - 'confirm' => '确认', - 'cancel' => '取消', + 'delete_confirm' => '确认删除?', + 'confirm' => '确认', + 'cancel' => '取消', 'refresh_succeeded' => '刷新成功 !', - 'submit' => '提交', - 'close' => '关闭', - 'selected_options' => '已选中:num个选项', - 'exceed_max_item' => '已超出最大可选数量', - 'no_preview' => '预览失败', + 'submit' => '提交', + 'close' => '关闭', + 'selected_options' => '已选中:num个选项', + 'exceed_max_item' => '已超出最大可选数量', + 'no_preview' => '预览失败', '500' => '系统繁忙,请稍后再试!', '403' => '对不起,您没有权限访问,请与管理员联系。', '401' => '请登录!', '419' => '对不起,当前页面已失效,请刷新浏览器。', ], - 'home' => '主页', - 'online' => '在线', - 'login' => '登录', - 'logout' => '登出', - 'setting' => '设置', - 'name' => '名称', - 'username' => '用户名', - 'old_password' => '旧密码', - 'password' => '密码', + 'home' => '主页', + 'online' => '在线', + 'login' => '登录', + 'logout' => '登出', + 'setting' => '设置', + 'name' => '名称', + 'username' => '用户名', + 'old_password' => '旧密码', + 'password' => '密码', 'password_confirmation' => '确认密码', - 'old_password_error' => '请输入正确的旧密码', - 'remember_me' => '记住我', - 'user_setting' => '用户设置', - 'avatar' => '头像', - 'list' => '列表', - 'new' => '新增', - 'create' => '创建', - 'delete' => '删除', - 'remove' => '移除', - 'edit' => '编辑', - 'quick_edit' => '快捷编辑', - 'continue_editing' => '继续编辑', - 'continue_creating' => '继续创建', - 'view' => '查看', - 'detail' => '详细', - 'browse' => '浏览', - 'reset' => '重置', - 'export' => '导出', - 'batch_delete' => '批量删除', - 'save' => '保存', - 'refresh' => '刷新', - 'order' => '排序', - 'expand' => '展开', - 'collapse' => '收起', - 'filter' => '筛选', - 'search' => '搜索', - 'close' => '关闭', - 'show' => '显示', - 'entries' => '条', - 'captcha' => '验证码', - 'action' => '操作', - 'title' => '标题', - 'description' => '简介', - 'back' => '返回', - 'back_to_list' => '返回列表', - 'submit' => '提交', - 'menu' => '菜单', - 'input' => '输入', - 'succeeded' => '成功', - 'failed' => '失败', - 'delete_confirm' => '确认删除?', - 'delete_succeeded' => '删除成功 !', - 'delete_failed' => '删除失败 !', - 'update_succeeded' => '更新成功 !', - 'update_failed' => '更新失败 !', - 'save_succeeded' => '保存成功 !', - 'save_failed' => '保存失败 !', - 'refresh_succeeded' => '刷新成功 !', - 'login_successful' => '登录成功 !', - 'choose' => '选择', - 'choose_file' => '选择文件', - 'choose_image' => '选择图片', - 'more' => '更多', - 'deny' => '无权访问', - 'administrator' => '管理员', - 'roles' => '角色', - 'permissions' => '权限', - 'slug' => '标识', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - 'alert' => '注意', - 'parent_id' => '父级', - 'icon' => '图标', - 'uri' => '路径', - 'operation_log' => '操作日志', - 'parent_select_error' => '父级选择错误', - 'default' => '默认', - 'table' => '表格', - 'no_data' => '暂无数据', - 'routes' => '路由', - 'alias' => '别名', - 'route_action' => '处理器', - 'middleware' => '中间件', - 'import' => '导入', - 'is_not_import' => '未导入', - 'selected_options' => '已选中:num个选项', - 'method' => '方法', - 'user' => '用户', - 'pagination' => [ + 'old_password_error' => '请输入正确的旧密码', + 'remember_me' => '记住我', + 'user_setting' => '用户设置', + 'avatar' => '头像', + 'list' => '列表', + 'new' => '新增', + 'create' => '创建', + 'delete' => '删除', + 'remove' => '移除', + 'edit' => '编辑', + 'quick_edit' => '快捷编辑', + 'continue_editing' => '继续编辑', + 'continue_creating' => '继续创建', + 'view' => '查看', + 'detail' => '详细', + 'browse' => '浏览', + 'reset' => '重置', + 'export' => '导出', + 'batch_delete' => '批量删除', + 'save' => '保存', + 'refresh' => '刷新', + 'order' => '排序', + 'expand' => '展开', + 'collapse' => '收起', + 'filter' => '筛选', + 'search' => '搜索', + 'close' => '关闭', + 'show' => '显示', + 'entries' => '条', + 'captcha' => '验证码', + 'action' => '操作', + 'title' => '标题', + 'description' => '简介', + 'back' => '返回', + 'back_to_list' => '返回列表', + 'submit' => '提交', + 'menu' => '菜单', + 'input' => '输入', + 'succeeded' => '成功', + 'failed' => '失败', + 'delete_confirm' => '确认删除?', + 'delete_succeeded' => '删除成功 !', + 'delete_failed' => '删除失败 !', + 'update_succeeded' => '更新成功 !', + 'update_failed' => '更新失败 !', + 'save_succeeded' => '保存成功 !', + 'save_failed' => '保存失败 !', + 'refresh_succeeded' => '刷新成功 !', + 'login_successful' => '登录成功 !', + 'choose' => '选择', + 'choose_file' => '选择文件', + 'choose_image' => '选择图片', + 'more' => '更多', + 'deny' => '无权访问', + 'administrator' => '管理员', + 'roles' => '角色', + 'permissions' => '权限', + 'slug' => '标识', + 'created_at' => '创建时间', + 'updated_at' => '更新时间', + 'alert' => '注意', + 'parent_id' => '父级', + 'icon' => '图标', + 'uri' => '路径', + 'operation_log' => '操作日志', + 'parent_select_error' => '父级选择错误', + 'default' => '默认', + 'table' => '表格', + 'no_data' => '暂无数据', + 'routes' => '路由', + 'alias' => '别名', + 'route_action' => '处理器', + 'middleware' => '中间件', + 'import' => '导入', + 'is_not_import' => '未导入', + 'selected_options' => '已选中:num个选项', + 'method' => '方法', + 'user' => '用户', + 'pagination' => [ 'range' => '从 :first 到 :last ,总共 :total 条', ], - 'role' => '角色', - 'permission' => '权限', - 'route' => '路由', - 'confirm' => '确认', - 'cancel' => '取消', - 'selectall' => '全选', - 'http' => [ + 'role' => '角色', + 'permission' => '权限', + 'route' => '路由', + 'confirm' => '确认', + 'cancel' => '取消', + 'selectall' => '全选', + 'http' => [ 'method' => 'HTTP方法', - 'path' => 'HTTP路径', + 'path' => 'HTTP路径', ], - 'all_methods_if_empty' => '为空默认为所有方法', - 'all' => '全部', - 'current_page' => '当前页', - 'selected_rows' => '选择的行', - 'upload' => '上传', - 'new_folder' => '新建文件夹', - 'time' => '时间', - 'size' => '大小', - 'between_start' => '起始', - 'between_end' => '结束', - 'next_page' => '下一页', - 'prev_page' => '上一页', - 'next_step' => '下一步', - 'prev_step' => '上一步', - 'done' => '完成', - 'listbox' => [ - 'text_total' => '总共 {0} 项', - 'text_empty' => '空列表', - 'filtered' => '{0} / {1}', - 'filter_clear' => '显示全部', + 'all_methods_if_empty' => '为空默认为所有方法', + 'all' => '全部', + 'current_page' => '当前页', + 'selected_rows' => '选择的行', + 'upload' => '上传', + 'new_folder' => '新建文件夹', + 'time' => '时间', + 'size' => '大小', + 'between_start' => '起始', + 'between_end' => '结束', + 'next_page' => '下一页', + 'prev_page' => '上一页', + 'next_step' => '下一步', + 'prev_step' => '上一步', + 'done' => '完成', + 'listbox' => [ + 'text_total' => '总共 {0} 项', + 'text_empty' => '空列表', + 'filtered' => '{0} / {1}', + 'filter_clear' => '显示全部', 'filter_placeholder' => '过滤', ], - 'responsive' => [ + 'responsive' => [ 'display_all' => '显示全部', - 'display' => '字段', - 'focus' => '聚焦', + 'display' => '字段', + 'focus' => '聚焦', ], 'uploader' => [ - 'add_new_media' => '添加文件', - 'drag_file' => '或将文件拖到这里', - 'max_file_limit' => 'The :attribute may not be greater than :max.', - 'exceed_size' => '文件大小超出', - 'interrupt' => '上传暂停', - 'upload_failed' => '上传失败,请重试', - 'selected_files' => '选中:num个文件,共:size。', - 'selected_has_failed' => '已成功上传:success个文件,:fail个文件上传失败,重新上传失败文件或忽略', - 'selected_success' => '共:num个(:size),已上传:success个。', - 'dot' => ',', - 'failed_num' => '失败:fail个。', - 'pause_upload' => '暂停上传', - 'go_on_upload' => '继续上传', - 'start_upload' => '开始上传', + 'add_new_media' => '添加文件', + 'drag_file' => '或将文件拖到这里', + 'max_file_limit' => 'The :attribute may not be greater than :max.', + 'exceed_size' => '文件大小超出', + 'interrupt' => '上传暂停', + 'upload_failed' => '上传失败,请重试', + 'selected_files' => '选中:num个文件,共:size。', + 'selected_has_failed' => '已成功上传:success个文件,:fail个文件上传失败,重新上传失败文件或忽略', + 'selected_success' => '共:num个(:size),已上传:success个。', + 'dot' => ',', + 'failed_num' => '失败:fail个。', + 'pause_upload' => '暂停上传', + 'go_on_upload' => '继续上传', + 'start_upload' => '开始上传', 'upload_success_message' => '已成功上传:success个文件', - 'go_on_add' => '继续添加', - 'Q_TYPE_DENIED' => '对不起,不允许上传此类型文件', - 'Q_EXCEED_NUM_LIMIT' => '对不起,已超出文件上传数量限制,最多只能上传:num个文件', - 'F_EXCEED_SIZE' => '对不起,当前选择的文件过大', - 'Q_EXCEED_SIZE_LIMIT' => '对不起,已超出文件大小限制', - 'F_DUPLICATE' => '文件重复', - 'confirm_delete_file' => '您确定要删除这个文件吗?', - 'dimensions' => '图片规格不正确', + 'go_on_add' => '继续添加', + 'Q_TYPE_DENIED' => '对不起,不允许上传此类型文件', + 'Q_EXCEED_NUM_LIMIT' => '对不起,已超出文件上传数量限制,最多只能上传:num个文件', + 'F_EXCEED_SIZE' => '对不起,当前选择的文件过大', + 'Q_EXCEED_SIZE_LIMIT' => '对不起,已超出文件大小限制', + 'F_DUPLICATE' => '文件重复', + 'confirm_delete_file' => '您确定要删除这个文件吗?', + 'dimensions' => '图片规格不正确', ], - 'import_extension_confirm' => '确认导入拓展?', - 'quick_create' => '快速创建', - 'grid_items_selected' => '已选择 {n} 项', - 'nothing_updated' => '没有任何数据被更改', - 'welcome_back' => '欢迎回来,请登录您的账号。', - 'documentation' => '文档', - 'demo' => '示例', - 'extensions' => '扩展', - 'version' => '版本', - 'current_version' => '当前版本', - 'latest_version' => '最新版本', - 'upgrade_to_version' => '更新至版本 :version', - 'enable' => '启用', - 'disable' => '禁用', - 'uninstall' => '卸载', - 'confirm_uninstall' => '您确定要卸载当前扩展吗?此操作将会移除扩展数据!', - 'marketplace' => '应用市场', - 'theme' => '主题', - 'application' => '应用', - 'install_from_local' => '本地安装', - 'install_succeeded' => '安装成功', + 'import_extension_confirm' => '确认导入拓展?', + 'quick_create' => '快速创建', + 'grid_items_selected' => '已选择 {n} 项', + 'nothing_updated' => '没有任何数据被更改', + 'welcome_back' => '欢迎回来,请登录您的账号。', + 'documentation' => '文档', + 'demo' => '示例', + 'extensions' => '扩展', + 'version' => '版本', + 'current_version' => '当前版本', + 'latest_version' => '最新版本', + 'upgrade_to_version' => '更新至版本 :version', + 'enable' => '启用', + 'disable' => '禁用', + 'uninstall' => '卸载', + 'confirm_uninstall' => '您确定要卸载当前扩展吗?此操作将会移除扩展数据!', + 'marketplace' => '应用市场', + 'theme' => '主题', + 'application' => '应用', + 'install_from_local' => '本地安装', + 'install_succeeded' => '安装成功', 'invalid_extension_package' => '安装包异常', - 'copied' => '已复制', - 'auth_failed' => '账号或密码错误', - 'validation' => [ - 'match' => '与 :attribute 不匹配。', + 'copied' => '已复制', + 'auth_failed' => '账号或密码错误', + 'validation' => [ + 'match' => '与 :attribute 不匹配。', 'minlength' => ':attribute 字符长度不能少于 :min。', 'maxlength' => ':attribute 字符长度不能超出 :max。', ], diff --git a/resources/lang/zh_CN/extension.php b/resources/lang/zh_CN/extension.php index d311ca242c68f20ba61ed162f7b829c329aab32b..686901755bc6ed6f9b7046512910a3f82600c2be 100644 --- a/resources/lang/zh_CN/extension.php +++ b/resources/lang/zh_CN/extension.php @@ -5,17 +5,17 @@ return [ 'Extensions' => '扩展', ], 'fields' => [ - 'alias' => '别名', + 'alias' => '别名', 'description' => '描述', - 'authors' => '开发者', - 'homepage' => '主页', - 'require' => '依赖', + 'authors' => '开发者', + 'homepage' => '主页', + 'require' => '依赖', 'require_dev' => '开发环境依赖', - 'name' => '包名', - 'version' => '版本', - 'enable' => '启用', - 'config' => '配置', - 'imported' => '导入', + 'name' => '包名', + 'version' => '版本', + 'enable' => '启用', + 'config' => '配置', + 'imported' => '导入', ], 'options' => [ ], diff --git a/resources/lang/zh_CN/global.php b/resources/lang/zh_CN/global.php index 9f9af97a5414e6380eac1fa218ea349af09c7887..258c90f610078269e28b0df224bc388df973291d 100644 --- a/resources/lang/zh_CN/global.php +++ b/resources/lang/zh_CN/global.php @@ -2,33 +2,33 @@ return [ 'fields' => [ - 'id' => 'ID', - 'name' => '名称', - 'username' => '用户名', - 'email' => '邮箱', - 'http_path' => 'HTTP路径', - 'password' => '密码', + 'id' => 'ID', + 'name' => '名称', + 'username' => '用户名', + 'email' => '邮箱', + 'http_path' => 'HTTP路径', + 'password' => '密码', 'password_confirmation' => '确认密码', - 'created_at' => '创建时间', - 'updated_at' => '更新时间', - 'permissions' => '权限', - 'slug' => '标识', - 'user' => '用户', - 'order' => '排序', - 'ip' => 'IP', - 'method' => '方法', - 'uri' => 'URI', - 'roles' => '角色', - 'path' => '路径', - 'input' => '输入', - 'type' => '类型', + 'created_at' => '创建时间', + 'updated_at' => '更新时间', + 'permissions' => '权限', + 'slug' => '标识', + 'user' => '用户', + 'order' => '排序', + 'ip' => 'IP', + 'method' => '方法', + 'uri' => 'URI', + 'roles' => '角色', + 'path' => '路径', + 'input' => '输入', + 'type' => '类型', ], 'labels' => [ - 'list' => '列表', - 'edit' => '编辑', - 'detail' => '详细', - 'create' => '创建', - 'root' => '顶级', + 'list' => '列表', + 'edit' => '编辑', + 'detail' => '详细', + 'create' => '创建', + 'root' => '顶级', 'scaffold' => '代码生成器', ], 'options' => [ diff --git a/resources/lang/zh_CN/menu.php b/resources/lang/zh_CN/menu.php index acf6627df91c5b92f827ced8f7bead60890637cd..42715f93f0d79e8f29ecd21f5d35f055ca4fa9fc 100644 --- a/resources/lang/zh_CN/menu.php +++ b/resources/lang/zh_CN/menu.php @@ -2,16 +2,16 @@ return [ 'titles' => [ - 'index' => '主页', - 'admin' => '系统', - 'users' => '管理员', - 'roles' => '角色', - 'permission' => '权限', - 'menu' => '菜单', + 'index' => '主页', + 'admin' => '系统', + 'users' => '管理员', + 'roles' => '角色', + 'permission' => '权限', + 'menu' => '菜单', 'operation_log' => '操作日志', - 'helpers' => '开发工具', - 'extensions' => '扩展', - 'scaffold' => '代码生成器', - 'icons' => '图标', + 'helpers' => '开发工具', + 'extensions' => '扩展', + 'scaffold' => '代码生成器', + 'icons' => '图标', ], ]; diff --git a/resources/lang/zh_TW/admin.php b/resources/lang/zh_TW/admin.php index a9f499abb2010b0431a73bcab50eea85b54de499..f71c4a07be20286e9257263b1f5990618a761b7f 100644 --- a/resources/lang/zh_TW/admin.php +++ b/resources/lang/zh_TW/admin.php @@ -2,227 +2,227 @@ return [ 'scaffold' => [ - 'header' => '代碼生成器', - 'choose' => '選擇已有數據表', - 'table' => '表名', - 'model' => '模型', - 'controller' => '控制器', - 'repository' => '數據倉庫', - 'add_field' => '添加欄位', - 'pk' => '主鍵', - 'soft_delete' => '軟刪除', - 'create_migration' => '創建表遷移文件', - 'create_model' => '創建模型', + 'header' => '代碼生成器', + 'choose' => '選擇已有數據表', + 'table' => '表名', + 'model' => '模型', + 'controller' => '控制器', + 'repository' => '數據倉庫', + 'add_field' => '添加欄位', + 'pk' => '主鍵', + 'soft_delete' => '軟刪除', + 'create_migration' => '創建表遷移文件', + 'create_model' => '創建模型', 'create_repository' => '創建數據倉庫', 'create_controller' => '創建控制器', - 'run_migrate' => '執行遷移文件', - 'create_lang' => '創建翻譯文件', - 'field' => '欄位', - 'translation' => '翻譯', - 'comment' => '註解', - 'default' => '預設值', - 'field_name' => '欄位名', - 'type' => '類型', - 'nullable' => '允許null', - 'key' => '索引', - 'translate_title' => '翻譯標題', + 'run_migrate' => '執行遷移文件', + 'create_lang' => '創建翻譯文件', + 'field' => '欄位', + 'translation' => '翻譯', + 'comment' => '註解', + 'default' => '預設值', + 'field_name' => '欄位名', + 'type' => '類型', + 'nullable' => '允許null', + 'key' => '索引', + 'translate_title' => '翻譯標題', 'sync_translation_with_comment' => '同步翻譯與註釋', ], 'client' => [ - 'delete_confirm' => '確認刪除?', - 'confirm' => '確認', - 'cancel' => '取消', + 'delete_confirm' => '確認刪除?', + 'confirm' => '確認', + 'cancel' => '取消', 'refresh_succeeded' => '刷新成功!', - 'close' => '關閉', - 'submit' => '提交', - 'selected_options' => '已選中:num個選項', - 'exceed_max_item' => '已超出最大可選數量', - 'no_preview' => '預覽失敗', + 'close' => '關閉', + 'submit' => '提交', + 'selected_options' => '已選中:num個選項', + 'exceed_max_item' => '已超出最大可選數量', + 'no_preview' => '預覽失敗', '500' => '系統繁忙,請稍後再試!', '403' => '對不起,您無訪問權限,請聯繫管理員。', '401' => '請先登入!', '419' => '對不起,當前頁面已失效,請刷新瀏覽器。', ], - 'home' => '首頁', - 'online' => '在線', - 'login' => '登入', - 'logout' => '登出', - 'setting' => '設置', - 'name' => '名稱', - 'username' => '用戶名', - 'old_password' => '舊密碼', - 'password' => '密碼', + 'home' => '首頁', + 'online' => '在線', + 'login' => '登入', + 'logout' => '登出', + 'setting' => '設置', + 'name' => '名稱', + 'username' => '用戶名', + 'old_password' => '舊密碼', + 'password' => '密碼', 'password_confirmation' => '確認密碼', - 'old_password_error' => '舊密碼輸入錯誤', - 'remember_me' => '記住我', - 'user_setting' => '用戶設置', - 'avatar' => '頭像', - 'list' => '列表', - 'new' => '新增', - 'create' => '創建', - 'delete' => '刪除', - 'remove' => '移除', - 'edit' => '編輯', - 'quick_edit' => '快速編輯', - 'continue_editing' => '繼續編輯', - 'continue_creating' => '繼續新增', - 'view' => '查看', - 'detail' => '詳細', - 'browse' => '瀏覽', - 'reset' => '重置', - 'export' => '匯出', - 'batch_delete' => '批次刪除', - 'save' => '儲存', - 'refresh' => '重新整理', - 'order' => '排序', - 'expand' => '展開', - 'collapse' => '收起', - 'filter' => '篩選', - 'search' => '搜索', - 'close' => '關閉', - 'show' => '詳情', - 'entries' => '條', - 'captcha' => '驗證碼', - 'action' => '操作', - 'title' => '標題', - 'description' => '簡介', - 'back' => '返回', - 'back_to_list' => '返回列表', - 'submit' => '送出', - 'menu' => '目錄', - 'input' => '輸入', - 'succeeded' => '成功', - 'failed' => '失敗', - 'delete_confirm' => '確認刪除?', - 'delete_succeeded' => '刪除成功!', - 'delete_failed' => '刪除失敗!', - 'update_succeeded' => '更新成功!', - 'update_failed' => '更新失敗 !', - 'save_succeeded' => '儲存成功!', - 'save_failed' => '儲存失敗 !', - 'refresh_succeeded' => '刷新成功!', - 'login_successful' => '登入成功!', - 'choose' => '選擇', - 'choose_file' => '選擇檔案', - 'choose_image' => '選擇圖片', - 'more' => '更多', - 'deny' => '權限不足', - 'administrator' => '管理員', - 'roles' => '角色', - 'permissions' => '權限', - 'slug' => '標誌', - 'created_at' => '建立時間', - 'updated_at' => '更新時間', - 'alert' => '警告', - 'parent_id' => '父級', - 'icon' => '圖示', - 'uri' => '路徑', - 'operation_log' => '操作記錄', - 'parent_select_error' => '父級選擇錯誤', - 'default' => '預設', - 'table' => '表格', - 'no_data' => '暫無數據', - 'routes' => '路由', - 'alias' => '別名', - 'route_action' => '處理器', - 'middleware' => '中間件', - 'import' => '導入', - 'is_not_import' => '未導入', - 'selected_options' => '已選中:num個選項', - 'method' => '方法', - 'user' => '用戶', - 'pagination' => [ + 'old_password_error' => '舊密碼輸入錯誤', + 'remember_me' => '記住我', + 'user_setting' => '用戶設置', + 'avatar' => '頭像', + 'list' => '列表', + 'new' => '新增', + 'create' => '創建', + 'delete' => '刪除', + 'remove' => '移除', + 'edit' => '編輯', + 'quick_edit' => '快速編輯', + 'continue_editing' => '繼續編輯', + 'continue_creating' => '繼續新增', + 'view' => '查看', + 'detail' => '詳細', + 'browse' => '瀏覽', + 'reset' => '重置', + 'export' => '匯出', + 'batch_delete' => '批次刪除', + 'save' => '儲存', + 'refresh' => '重新整理', + 'order' => '排序', + 'expand' => '展開', + 'collapse' => '收起', + 'filter' => '篩選', + 'search' => '搜索', + 'close' => '關閉', + 'show' => '詳情', + 'entries' => '條', + 'captcha' => '驗證碼', + 'action' => '操作', + 'title' => '標題', + 'description' => '簡介', + 'back' => '返回', + 'back_to_list' => '返回列表', + 'submit' => '送出', + 'menu' => '目錄', + 'input' => '輸入', + 'succeeded' => '成功', + 'failed' => '失敗', + 'delete_confirm' => '確認刪除?', + 'delete_succeeded' => '刪除成功!', + 'delete_failed' => '刪除失敗!', + 'update_succeeded' => '更新成功!', + 'update_failed' => '更新失敗 !', + 'save_succeeded' => '儲存成功!', + 'save_failed' => '儲存失敗 !', + 'refresh_succeeded' => '刷新成功!', + 'login_successful' => '登入成功!', + 'choose' => '選擇', + 'choose_file' => '選擇檔案', + 'choose_image' => '選擇圖片', + 'more' => '更多', + 'deny' => '權限不足', + 'administrator' => '管理員', + 'roles' => '角色', + 'permissions' => '權限', + 'slug' => '標誌', + 'created_at' => '建立時間', + 'updated_at' => '更新時間', + 'alert' => '警告', + 'parent_id' => '父級', + 'icon' => '圖示', + 'uri' => '路徑', + 'operation_log' => '操作記錄', + 'parent_select_error' => '父級選擇錯誤', + 'default' => '預設', + 'table' => '表格', + 'no_data' => '暫無數據', + 'routes' => '路由', + 'alias' => '別名', + 'route_action' => '處理器', + 'middleware' => '中間件', + 'import' => '導入', + 'is_not_import' => '未導入', + 'selected_options' => '已選中:num個選項', + 'method' => '方法', + 'user' => '用戶', + 'pagination' => [ 'range' => '從 :first 到 :last ,總共 :total 條', ], - 'role' => '角色', - 'permission' => '權限', - 'route' => '路由', - 'confirm' => '確認', - 'cancel' => '取消', - 'selectall' => '全選', - 'http' => [ + 'role' => '角色', + 'permission' => '權限', + 'route' => '路由', + 'confirm' => '確認', + 'cancel' => '取消', + 'selectall' => '全選', + 'http' => [ 'method' => 'HTTP方法', - 'path' => 'HTTP路徑', + 'path' => 'HTTP路徑', ], - 'all_methods_if_empty' => '所有方法預設為空', - 'all' => '全部', - 'current_page' => '現在頁面', - 'selected_rows' => '選擇的行', - 'upload' => '上傳', - 'new_folder' => '新建資料夾', - 'time' => '時間', - 'size' => '大小', - 'between_start' => '起始', - 'between_end' => '結束', - 'next_page' => '下一頁', - 'prev_page' => '上一頁', - 'next_step' => '下一步', - 'prev_step' => '上一步', - 'done' => '完成', - 'listbox' => [ - 'text_total' => '總共 {0} 項', - 'text_empty' => '空列表', - 'filtered' => '{0} / {1}', - 'filter_clear' => '顯示全部', + 'all_methods_if_empty' => '所有方法預設為空', + 'all' => '全部', + 'current_page' => '現在頁面', + 'selected_rows' => '選擇的行', + 'upload' => '上傳', + 'new_folder' => '新建資料夾', + 'time' => '時間', + 'size' => '大小', + 'between_start' => '起始', + 'between_end' => '結束', + 'next_page' => '下一頁', + 'prev_page' => '上一頁', + 'next_step' => '下一步', + 'prev_step' => '上一步', + 'done' => '完成', + 'listbox' => [ + 'text_total' => '總共 {0} 項', + 'text_empty' => '空列表', + 'filtered' => '{0} / {1}', + 'filter_clear' => '顯示全部', 'filter_placeholder' => '過濾', ], - 'responsive' => [ + 'responsive' => [ 'display_all' => '顯示全部', - 'display' => '欄位', - 'focus' => '聚焦', + 'display' => '欄位', + 'focus' => '聚焦', ], 'uploader' => [ - 'add_new_media' => '添加檔案', - 'drag_file' => '或將檔案拖移到這裡', - 'max_file_limit' => ':attribute不能超過:max.', - 'exceed_size' => '檔案大小過大', - 'interrupt' => '暫停上傳', - 'upload_failed' => '上傳失敗,請再試一次', - 'selected_files' => '選中:num個檔案,共:size。', - 'selected_has_failed' => '已成功上傳:success個檔案,:fail個檔案上傳失敗,重新上傳失敗檔案或忽略', - 'selected_success' => '共:num个(:size),已上傳:success個。', - 'dot' => ',', - 'failed_num' => '失敗:fail個。', - 'pause_upload' => '暫停上傳', - 'go_on_upload' => '繼續上傳', - 'start_upload' => '開始上傳', + 'add_new_media' => '添加檔案', + 'drag_file' => '或將檔案拖移到這裡', + 'max_file_limit' => ':attribute不能超過:max.', + 'exceed_size' => '檔案大小過大', + 'interrupt' => '暫停上傳', + 'upload_failed' => '上傳失敗,請再試一次', + 'selected_files' => '選中:num個檔案,共:size。', + 'selected_has_failed' => '已成功上傳:success個檔案,:fail個檔案上傳失敗,重新上傳失敗檔案或忽略', + 'selected_success' => '共:num个(:size),已上傳:success個。', + 'dot' => ',', + 'failed_num' => '失敗:fail個。', + 'pause_upload' => '暫停上傳', + 'go_on_upload' => '繼續上傳', + 'start_upload' => '開始上傳', 'upload_success_message' => '已成功上傳:success個檔案', - 'go_on_add' => '繼續添加', - 'Q_TYPE_DENIED' => '對不起,無法上傳該類型檔案', - 'Q_EXCEED_NUM_LIMIT' => '对不起,超出上傳數量限制,最多只能上傳:num個檔案', - 'F_EXCEED_SIZE' => '对不起,當前選擇的檔案過大', - 'Q_EXCEED_SIZE_LIMIT' => '对不起,檔案大小超出限制', - 'F_DUPLICATE' => '檔案重複', - 'confirm_delete_file' => '您確定要刪除該檔案嗎?', - 'dimensions' => '圖片規格不正確', + 'go_on_add' => '繼續添加', + 'Q_TYPE_DENIED' => '對不起,無法上傳該類型檔案', + 'Q_EXCEED_NUM_LIMIT' => '对不起,超出上傳數量限制,最多只能上傳:num個檔案', + 'F_EXCEED_SIZE' => '对不起,當前選擇的檔案過大', + 'Q_EXCEED_SIZE_LIMIT' => '对不起,檔案大小超出限制', + 'F_DUPLICATE' => '檔案重複', + 'confirm_delete_file' => '您確定要刪除該檔案嗎?', + 'dimensions' => '圖片規格不正確', ], - 'import_extension_confirm' => '確認導入擴展?', - 'quick_create' => '快速新增', - 'grid_items_selected' => '已選擇 {n} 項', - 'nothing_updated' => '沒有任何資料被更改', - 'welcome_back' => '歡迎回來,請登入帳號', - 'documentation' => '文檔', - 'demo' => '範例', - 'extensions' => '擴展', - 'version' => '版本', - 'current_version' => '当前版本', - 'latest_version' => '當前版本', - 'upgrade_to_version' => '更新至版本 :version', - 'enable' => '啟用', - 'disable' => '禁用', - 'uninstall' => '卸載', - 'confirm_uninstall' => '您確定要卸載當前擴展嗎?此操作將會移除擴展數據!', - 'marketplace' => '應用市場', - 'theme' => '主題', - 'application' => '應用', - 'install_from_local' => '本地安装', - 'install_succeeded' => '本地安裝', + 'import_extension_confirm' => '確認導入擴展?', + 'quick_create' => '快速新增', + 'grid_items_selected' => '已選擇 {n} 項', + 'nothing_updated' => '沒有任何資料被更改', + 'welcome_back' => '歡迎回來,請登入帳號', + 'documentation' => '文檔', + 'demo' => '範例', + 'extensions' => '擴展', + 'version' => '版本', + 'current_version' => '当前版本', + 'latest_version' => '當前版本', + 'upgrade_to_version' => '更新至版本 :version', + 'enable' => '啟用', + 'disable' => '禁用', + 'uninstall' => '卸載', + 'confirm_uninstall' => '您確定要卸載當前擴展嗎?此操作將會移除擴展數據!', + 'marketplace' => '應用市場', + 'theme' => '主題', + 'application' => '應用', + 'install_from_local' => '本地安装', + 'install_succeeded' => '本地安裝', 'invalid_extension_package' => '安裝包異常', - 'copied' => '已複製', - 'auth_failed' => '帳號或密碼錯誤', - 'validation' => [ - 'match' => '與 :attribute 不匹配。', + 'copied' => '已複製', + 'auth_failed' => '帳號或密碼錯誤', + 'validation' => [ + 'match' => '與 :attribute 不匹配。', 'minlength' => ':attribute 長度不能少於 :min。', 'maxlength' => ':attribute 長度不能超過 :max。', ], diff --git a/resources/lang/zh_TW/extension.php b/resources/lang/zh_TW/extension.php index bd1ae2d63feb195b8231c4f1a9cccb81524a4071..8019ba0c7d479915169248ee4fe3a783ad564eb4 100644 --- a/resources/lang/zh_TW/extension.php +++ b/resources/lang/zh_TW/extension.php @@ -5,17 +5,17 @@ return [ 'Extensions' => '擴展', ], 'fields' => [ - 'alias' => '別名', + 'alias' => '別名', 'description' => '說明', - 'authors' => '作者', - 'homepage' => '首頁', - 'require' => '依賴', + 'authors' => '作者', + 'homepage' => '首頁', + 'require' => '依賴', 'require_dev' => '開發環境依賴', - 'name' => '名稱', - 'version' => '版本', - 'enable' => '啟用', - 'config' => '設定', - 'imported' => '導入', + 'name' => '名稱', + 'version' => '版本', + 'enable' => '啟用', + 'config' => '設定', + 'imported' => '導入', ], 'options' => [ ], diff --git a/resources/lang/zh_TW/global.php b/resources/lang/zh_TW/global.php index 0c920c4c162844d95eee1aeff582903c19dfb57e..6a31c2421e1e630966d67e5f0b9f2144672d8630 100644 --- a/resources/lang/zh_TW/global.php +++ b/resources/lang/zh_TW/global.php @@ -2,33 +2,33 @@ return [ 'fields' => [ - 'id' => 'ID', - 'name' => '名稱', - 'username' => '用戶名', - 'email' => '信箱', - 'http_path' => 'HTTP路徑', - 'password' => '密碼', + 'id' => 'ID', + 'name' => '名稱', + 'username' => '用戶名', + 'email' => '信箱', + 'http_path' => 'HTTP路徑', + 'password' => '密碼', 'password_confirmation' => '確認密碼', - 'created_at' => '建立時間', - 'updated_at' => '更新時間', - 'permissions' => '權限', - 'slug' => '標示', - 'user' => '用戶', - 'order' => '排序', - 'ip' => 'IP', - 'method' => '方法', - 'uri' => 'URI', - 'roles' => '角色', - 'path' => '路徑', - 'input' => '輸入', - 'type' => '類型', + 'created_at' => '建立時間', + 'updated_at' => '更新時間', + 'permissions' => '權限', + 'slug' => '標示', + 'user' => '用戶', + 'order' => '排序', + 'ip' => 'IP', + 'method' => '方法', + 'uri' => 'URI', + 'roles' => '角色', + 'path' => '路徑', + 'input' => '輸入', + 'type' => '類型', ], 'labels' => [ - 'list' => '列表', - 'edit' => '編輯', - 'detail' => '詳細', - 'create' => '創建', - 'root' => 'root', + 'list' => '列表', + 'edit' => '編輯', + 'detail' => '詳細', + 'create' => '創建', + 'root' => 'root', 'scaffold' => '代碼生成器', ], diff --git a/resources/lang/zh_TW/menu.php b/resources/lang/zh_TW/menu.php index 1e3a49d2325c429b24487421342a28d2266ba8af..47b0e54015a9aed5b2eaf90b554c8af33c9cf6de 100644 --- a/resources/lang/zh_TW/menu.php +++ b/resources/lang/zh_TW/menu.php @@ -2,16 +2,16 @@ return [ 'titles' => [ - 'index' => '首頁', - 'admin' => '系統', - 'users' => '管理員', - 'roles' => '角色', - 'permission' => '權限', - 'menu' => '菜單', + 'index' => '首頁', + 'admin' => '系統', + 'users' => '管理員', + 'roles' => '角色', + 'permission' => '權限', + 'menu' => '菜單', 'operation_log' => '操作日誌', - 'helpers' => '開發工具', - 'extensions' => '擴展', - 'scaffold' => '代碼生成器', - 'icons' => '圖示', + 'helpers' => '開發工具', + 'extensions' => '擴展', + 'scaffold' => '代碼生成器', + 'icons' => '圖示', ], ]; diff --git a/src/Admin.php b/src/Admin.php index 6321540340c7462507f090ccd18419323444e46f..8984728ed34095a8f1704fb93e4837aff6a3707d 100755 --- a/src/Admin.php +++ b/src/Admin.php @@ -573,7 +573,7 @@ class Admin public static function routes() { $attributes = [ - 'prefix' => config('admin.route.prefix'), + 'prefix' => config('admin.route.prefix'), 'middleware' => config('admin.route.middleware'), ]; @@ -614,10 +614,10 @@ class Admin public static function registerApiRoutes() { $attributes = [ - 'prefix' => admin_base_path('dcat-api'), + 'prefix' => admin_base_path('dcat-api'), 'middleware' => config('admin.route.middleware'), - 'namespace' => 'Dcat\Admin\Http\Controllers', - 'as' => 'dcat-api.', + 'namespace' => 'Dcat\Admin\Http\Controllers', + 'as' => 'dcat-api.', ]; app('router')->group($attributes, function ($router) { @@ -645,7 +645,7 @@ class Admin } $attributes = [ - 'prefix' => config('admin.route.prefix'), + 'prefix' => config('admin.route.prefix'), 'middleware' => config('admin.route.middleware'), ]; diff --git a/src/AdminServiceProvider.php b/src/AdminServiceProvider.php index bb31b4fa71a4c2b3c3c86c2246b0d7ac900eefa8..048acc0c7204662dd4d52dd40b4ae7a3c1c2233f 100755 --- a/src/AdminServiceProvider.php +++ b/src/AdminServiceProvider.php @@ -64,13 +64,13 @@ class AdminServiceProvider extends ServiceProvider * @var array */ protected $routeMiddleware = [ - 'admin.auth' => Http\Middleware\Authenticate::class, - 'admin.pjax' => Http\Middleware\Pjax::class, + 'admin.auth' => Http\Middleware\Authenticate::class, + 'admin.pjax' => Http\Middleware\Pjax::class, 'admin.permission' => Http\Middleware\Permission::class, - 'admin.bootstrap' => Http\Middleware\Bootstrap::class, - 'admin.session' => Http\Middleware\Session::class, - 'admin.upload' => Http\Middleware\WebUploader::class, - 'admin.app' => Http\Middleware\Application::class, + 'admin.bootstrap' => Http\Middleware\Bootstrap::class, + 'admin.session' => Http\Middleware\Session::class, + 'admin.upload' => Http\Middleware\WebUploader::class, + 'admin.app' => Http\Middleware\Application::class, ]; /** diff --git a/src/Application.php b/src/Application.php index 2dd099fe50c607174ca731206b540a412b091db0..5996c568fb1df94767296d2975e5675b201e140a 100644 --- a/src/Application.php +++ b/src/Application.php @@ -154,8 +154,8 @@ class Application { Route::group(array_filter([ 'middleware' => 'admin.app:'.$app, - 'domain' => config("{$app}.route.domain"), - 'as' => $this->getRoutePrefix($app), + 'domain' => config("{$app}.route.domain"), + 'as' => $this->getRoutePrefix($app), ]), $path); } } diff --git a/src/Color.php b/src/Color.php index 6814c8922c4d556b9d30cf99c1694ead0e86fe6c..b428005876db0c609b04109f918a17b93ff6b8c7 100644 --- a/src/Color.php +++ b/src/Color.php @@ -75,30 +75,30 @@ class Color protected static $extensions = [ 'default' => [ 'colors' => [ - 'primary' => '#586cb1', + 'primary' => '#586cb1', 'primary-darker' => '#4c60a3', - 'link' => '#4c60a3', + 'link' => '#4c60a3', ], ], 'blue-light' => [ 'colors' => [ - 'primary' => '#62a8ea', + 'primary' => '#62a8ea', 'primary-darker' => '#62a8ea', - 'link' => '#62a8ea', + 'link' => '#62a8ea', ], ], 'blue' => [ 'colors' => [ - 'primary' => '#6d8be6', + 'primary' => '#6d8be6', 'primary-darker' => '#6d8be6', - 'link' => '#6d8be6', + 'link' => '#6d8be6', ], ], 'green' => [ 'colors' => [ - 'primary' => '#4e9876', + 'primary' => '#4e9876', 'primary-darker' => '#458769', - 'link' => '#458769', + 'link' => '#458769', ], ], ]; @@ -109,21 +109,21 @@ class Color * @var array */ protected static $allColors = [ - 'info' => 'blue', + 'info' => 'blue', 'success' => 'green', - 'danger' => 'red', + 'danger' => 'red', 'warning' => 'orange', - 'indigo' => '#5c6bc6', - 'blue' => '#3085d6', - 'red' => '#ea5455', - 'orange' => '#dda451', - 'green' => '#21b978', - 'cyan' => '#7367f0', - 'purple' => '#5b69bc', - 'custom' => '#59a9f8', - 'pink' => '#ff8acc', - 'dark' => '#22292f', - 'white' => '#fff', + 'indigo' => '#5c6bc6', + 'blue' => '#3085d6', + 'red' => '#ea5455', + 'orange' => '#dda451', + 'green' => '#21b978', + 'cyan' => '#7367f0', + 'purple' => '#5b69bc', + 'custom' => '#59a9f8', + 'pink' => '#ff8acc', + 'dark' => '#22292f', + 'white' => '#fff', 'white50' => 'hsla(0,0%,100%,.5)', // 其他蓝色 @@ -138,9 +138,9 @@ class Color 'yellow' => '#edc30e', 'indigo-darker' => '#495abf', - 'red-darker' => '#bd4147', - 'blue-darker' => '#236bb0', - 'cyan-darker' => '#6355ee', + 'red-darker' => '#bd4147', + 'blue-darker' => '#236bb0', + 'cyan-darker' => '#6355ee', // 灰色 'gray' => '#b9c3cd', @@ -148,7 +148,7 @@ class Color 'light' => '#f7f7f9', // 水鸭色 - 'tear' => '#01847f', + 'tear' => '#01847f', 'tear1' => '#00b5b5', // 深色 diff --git a/src/Console/ActionCommand.php b/src/Console/ActionCommand.php index 9d41fcac89614548b6a6e98140bbb37bc657eebc..47ae58f11b893e2f62bb1a3b536e199792432851 100644 --- a/src/Console/ActionCommand.php +++ b/src/Console/ActionCommand.php @@ -38,12 +38,12 @@ class ActionCommand extends GeneratorCommand */ protected $namespaceMap = [ 'grid-batch' => 'Grid', - 'grid-row' => 'Grid', - 'grid-tool' => 'Grid', - 'form-tool' => 'Form', - 'show-tool' => 'Show', - 'tree-row' => 'Tree', - 'tree-tool' => 'Tree', + 'grid-row' => 'Grid', + 'grid-tool' => 'Grid', + 'form-tool' => 'Form', + 'show-tool' => 'Show', + 'tree-row' => 'Tree', + 'tree-tool' => 'Tree', ]; public function handle() diff --git a/src/Console/AdminCommand.php b/src/Console/AdminCommand.php index d1fb083675ea7ec4bf2b80b5955f97ff03d179af..8a14145405329749cb9fa8bf64ca5ece04199e9e 100755 --- a/src/Console/AdminCommand.php +++ b/src/Console/AdminCommand.php @@ -74,7 +74,7 @@ LOGO; } /** - * @param (Command|string)[] $commands + * @param (Command|string)[] $commands * @return int */ private function getColumnWidth(array $commands) diff --git a/src/Console/ExportSeedCommand.php b/src/Console/ExportSeedCommand.php index 2eea8959f3011a13b5135fcf52fd246332cd2630..c28591b5afcef661351dcb36e80936db1b467b77 100755 --- a/src/Console/ExportSeedCommand.php +++ b/src/Console/ExportSeedCommand.php @@ -41,35 +41,35 @@ class ExportSeedCommand extends Command 'DummyNamespace' => ucwords($namespace), 'DummyClass' => $name, - 'ClassMenu' => $this->getTableName('admin.database.menu_model'), - 'ClassPermission' => $this->getTableName('admin.database.permissions_model'), - 'ClassRole' => $this->getTableName('admin.database.roles_model'), - 'ClassSetting' => 'Models\Setting', - 'ClassExtension' => 'Models\Extension', + 'ClassMenu' => $this->getTableName('admin.database.menu_model'), + 'ClassPermission' => $this->getTableName('admin.database.permissions_model'), + 'ClassRole' => $this->getTableName('admin.database.roles_model'), + 'ClassSetting' => 'Models\Setting', + 'ClassExtension' => 'Models\Extension', 'ClassExtensionHistory' => 'Models\ExtensionHistory', - 'TablePermissionMenu' => $this->getTableName('admin.database.permission_menu_table'), - 'TableRoleMenu' => $this->getTableName('admin.database.role_menu_table'), + 'TablePermissionMenu' => $this->getTableName('admin.database.permission_menu_table'), + 'TableRoleMenu' => $this->getTableName('admin.database.role_menu_table'), 'TableRolePermissions' => $this->getTableName('admin.database.role_permissions_table'), - 'ArrayMenu' => $this->getTableDataArrayAsString(config('admin.database.menu_table'), $exceptFields), + '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), - 'ArraySetting' => $this->getTableDataArrayAsString(config('admin.database.settings_table') ?: 'admin_settings', $exceptFields), - 'ArrayExtension' => $this->getTableDataArrayAsString(config('admin.database.extensions_table') ?: 'admin_extensions', $exceptFields), + 'ArrayRole' => $this->getTableDataArrayAsString(config('admin.database.roles_table'), $exceptFields), + 'ArraySetting' => $this->getTableDataArrayAsString(config('admin.database.settings_table') ?: 'admin_settings', $exceptFields), + 'ArrayExtension' => $this->getTableDataArrayAsString(config('admin.database.extensions_table') ?: 'admin_extensions', $exceptFields), 'ArrayExtHistory' => $this->getTableDataArrayAsString(config('admin.database.extension_histories_table') ?: 'admin_extension_histories', $exceptFields), - 'ArrayPivotPermissionMenu' => $this->getTableDataArrayAsString(config('admin.database.permission_menu_table'), $exceptFields), - 'ArrayPivotRoleMenu' => $this->getTableDataArrayAsString(config('admin.database.role_menu_table'), $exceptFields), + 'ArrayPivotPermissionMenu' => $this->getTableDataArrayAsString(config('admin.database.permission_menu_table'), $exceptFields), + 'ArrayPivotRoleMenu' => $this->getTableDataArrayAsString(config('admin.database.role_menu_table'), $exceptFields), 'ArrayPivotRolePermissions' => $this->getTableDataArrayAsString(config('admin.database.role_permissions_table'), $exceptFields), ]; if ($exportUsers) { $replaces = array_merge($replaces, [ - 'ClassUsers' => $this->getTableName('admin.database.users_model'), - 'TableRoleUsers' => config('admin.database.role_users_table'), - 'ArrayUsers' => $this->getTableDataArrayAsString(config('admin.database.users_table'), $exceptFields), - 'ArrayPivotRoleUsers' => $this->getTableDataArrayAsString(config('admin.database.role_users_table'), $exceptFields), + 'ClassUsers' => $this->getTableName('admin.database.users_model'), + 'TableRoleUsers' => config('admin.database.role_users_table'), + 'ArrayUsers' => $this->getTableDataArrayAsString(config('admin.database.users_table'), $exceptFields), + 'ArrayPivotRoleUsers' => $this->getTableDataArrayAsString(config('admin.database.role_users_table'), $exceptFields), ]); } else { $contents = preg_replace('/\/\/ users tables[\s\S]*?(?=\/\/ finish)/mu', '', $contents); @@ -110,7 +110,7 @@ class ExportSeedCommand extends Command /** * Get stub contents. * - * @param $name + * @param $name * @return string */ protected function getStub($name) @@ -121,14 +121,13 @@ class ExportSeedCommand extends Command /** * Custom var_export for correct work with \r\n. * - * @param $var + * @param $var * @param string $indent * @return string */ protected function varExport($var, $indent = '') { switch (gettype($var)) { - case 'string': return '"'.addcslashes($var, "\\\$\"\r\n\t\v\f").'"'; diff --git a/src/Console/ExtensionMakeCommand.php b/src/Console/ExtensionMakeCommand.php index 03bf4e3093b2cca856a525789bc322664ec4caf2..443a3c00b22ba85c0f5867042cf5aef1b056afc3 100644 --- a/src/Console/ExtensionMakeCommand.php +++ b/src/Console/ExtensionMakeCommand.php @@ -276,11 +276,11 @@ TEXT; { $files = [ $view = __DIR__.'/stubs/extension/view.stub' => 'resources/views/index.blade.php', - $js = __DIR__.'/stubs/extension/js.stub' => 'resources/assets/js/index.js', - __DIR__.'/stubs/extension/css.stub' => 'resources/assets/css/index.css', - __DIR__.'/stubs/extension/.gitignore.stub' => '.gitignore', - __DIR__.'/stubs/extension/README.md.stub' => 'README.md', - __DIR__.'/stubs/extension/version.stub' => 'version.php', + $js = __DIR__.'/stubs/extension/js.stub' => 'resources/assets/js/index.js', + __DIR__.'/stubs/extension/css.stub' => 'resources/assets/css/index.css', + __DIR__.'/stubs/extension/.gitignore.stub' => '.gitignore', + __DIR__.'/stubs/extension/README.md.stub' => 'README.md', + __DIR__.'/stubs/extension/version.stub' => 'version.php', ]; if ($this->option('theme')) { diff --git a/src/Console/ExtensionRollbackCommand.php b/src/Console/ExtensionRollbackCommand.php index 9962fdde705c605cc81d1673c962b4544608ba86..ed4d88c2fcb6039f402449728e7933f2ef4bd7ae 100644 --- a/src/Console/ExtensionRollbackCommand.php +++ b/src/Console/ExtensionRollbackCommand.php @@ -22,7 +22,7 @@ class ExtensionRollbackCommand extends Command throw new \InvalidArgumentException('Extension not found'); } - $stopOnVersion = ltrim(($this->argument('ver') ?: null), 'v'); + $stopOnVersion = ltrim($this->argument('ver') ?: null, 'v'); if ($stopOnVersion) { if (! Admin::extension()->versionManager()->hasDatabaseVersion($name, $stopOnVersion)) { diff --git a/src/Console/IdeHelperCommand.php b/src/Console/IdeHelperCommand.php index f6abe447ae1966a5afb9e72f523c18fcdf9283ba..99d2e4a285652211da95a5a4bd4671d6feb34c9a 100755 --- a/src/Console/IdeHelperCommand.php +++ b/src/Console/IdeHelperCommand.php @@ -36,10 +36,10 @@ class IdeHelperCommand extends Command * @var array */ protected $patterns = [ - 'grid' => '/(?:grid)->([\w0-9_]+)(?:\(|;|->|\s)/i', - 'show' => '/show->([\w0-9_]+)(?:\(|;|->|\s)/i', + 'grid' => '/(?:grid)->([\w0-9_]+)(?:\(|;|->|\s)/i', + 'show' => '/show->([\w0-9_]+)(?:\(|;|->|\s)/i', 'grid-column' => '/@method[\s]+\$this[\s]+([\w0-9_]+)/i', - 'form-field' => '/@method[\s]+[\\\\\w0-9_]+[\s]+([\w0-9_]+)/i', + 'form-field' => '/@method[\s]+[\\\\\w0-9_]+[\s]+([\w0-9_]+)/i', 'grid-filter' => '/@method[\s]+[\\\\\w0-9_]+[\s]+([\w0-9_]+)/i', ]; @@ -48,14 +48,14 @@ class IdeHelperCommand extends Command */ protected $templates = [ 'grid' => [ - 'method' => '* @method Grid\Column|Collection %s(string $label = null)', + 'method' => '* @method Grid\Column|Collection %s(string $label = null)', 'property' => '* @property Grid\Column|Collection %s', ], 'show' => [ - 'method' => '* @method Show\Field|Collection %s(string $label = null)', + 'method' => '* @method Show\Field|Collection %s(string $label = null)', 'property' => '* @property Show\Field|Collection %s', ], - 'form' => '* @method %s %s(...$params)', + 'form' => '* @method %s %s(...$params)', 'grid-column' => '* @method $this %s(...$params)', 'grid-filter' => '* @method %s %s(...$params)', 'show-column' => '* @method $this %s(...$params)', diff --git a/src/Console/InstallCommand.php b/src/Console/InstallCommand.php index f856d6b44f54ecb0c935dc86b32d77e8df45a90b..dc1a25f8694d1455a01587f903bb7ee67d1b6660 100755 --- a/src/Console/InstallCommand.php +++ b/src/Console/InstallCommand.php @@ -145,12 +145,12 @@ class InstallCommand extends Command public function createMetricCards() { $map = [ - '/Metrics/Examples/NewUsers.php' => 'metrics/NewUsers', - '/Metrics/Examples/NewDevices.php' => 'metrics/NewDevices', + '/Metrics/Examples/NewUsers.php' => 'metrics/NewUsers', + '/Metrics/Examples/NewDevices.php' => 'metrics/NewDevices', '/Metrics/Examples/ProductOrders.php' => 'metrics/ProductOrders', - '/Metrics/Examples/Sessions.php' => 'metrics/Sessions', - '/Metrics/Examples/Tickets.php' => 'metrics/Tickets', - '/Metrics/Examples/TotalUsers.php' => 'metrics/TotalUsers', + '/Metrics/Examples/Sessions.php' => 'metrics/Sessions', + '/Metrics/Examples/Tickets.php' => 'metrics/Tickets', + '/Metrics/Examples/TotalUsers.php' => 'metrics/TotalUsers', ]; $namespace = $this->namespace('Metrics\\Examples'); @@ -209,7 +209,7 @@ class InstallCommand extends Command /** * Get stub contents. * - * @param $name + * @param $name * @return string */ protected function getStub($name) diff --git a/src/Console/MinifyCommand.php b/src/Console/MinifyCommand.php index e138ddb33b9bdb3862eaab1b2f32047a3295e738..44486321a13e39eb43111e25f7d53ee323609c3f 100644 --- a/src/Console/MinifyCommand.php +++ b/src/Console/MinifyCommand.php @@ -33,9 +33,9 @@ class MinifyCommand extends Command */ protected $colors = [ self::DEFAULT => '', - 'blue' => '#6d8be6', - 'blue-light' => '#62a8ea', - 'green' => '#4e9876', + 'blue' => '#6d8be6', + 'blue-light' => '#62a8ea', + 'green' => '#4e9876', ]; /** @@ -109,8 +109,8 @@ class MinifyCommand extends Command /** * 替换文件. * - * @param $name - * @param $color + * @param $name + * @param $color */ protected function replaceFiles($name, $color) { diff --git a/src/Console/UpdateCommand.php b/src/Console/UpdateCommand.php index 1f527b72812cfffeef707ca94cf63225503ee15c..bda7191b38b963535a0a093bfa6411cff23b1025 100755 --- a/src/Console/UpdateCommand.php +++ b/src/Console/UpdateCommand.php @@ -13,10 +13,10 @@ class UpdateCommand extends Command public function handle() { $this->call('admin:publish', [ - '--assets' => true, + '--assets' => true, '--migrations' => true, - '--lang' => true, - '--force' => true, + '--lang' => true, + '--force' => true, ]); $this->call('migrate'); } diff --git a/src/Exception/Handler.php b/src/Exception/Handler.php index d7adf189ad5f4ac41602864768e917a12bd68d71..fc52583b725a75e7665d907a53ebec59d043bb8d 100644 --- a/src/Exception/Handler.php +++ b/src/Exception/Handler.php @@ -46,11 +46,11 @@ class Handler implements ExceptionHandler } $error = new MessageBag([ - 'type' => get_class($exception), + 'type' => get_class($exception), 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), - 'trace' => $this->replaceBasePath($exception->getTraceAsString()), + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), + 'trace' => $this->replaceBasePath($exception->getTraceAsString()), ]); $errors = new ViewErrorBag(); diff --git a/src/Extend/CanImportMenu.php b/src/Extend/CanImportMenu.php index a540e0f27321ab3466e396b32a64b28b542014ef..dedf1fa9ccb21dcc801afa97987831f57fbf7c61 100644 --- a/src/Extend/CanImportMenu.php +++ b/src/Extend/CanImportMenu.php @@ -14,9 +14,9 @@ trait CanImportMenu protected $menuValidationRules = [ 'parent' => 'nullable', - 'title' => 'required', - 'uri' => 'nullable', - 'icon' => 'nullable', + 'title' => 'required', + 'uri' => 'nullable', + 'icon' => 'nullable', ]; /** @@ -57,10 +57,10 @@ trait CanImportMenu $menuModel::create([ 'parent_id' => $this->getParentMenuId($menu['parent'] ?? 0), - 'order' => $lastOrder + 1, - 'title' => $menu['title'], - 'icon' => (string) ($menu['icon'] ?? ''), - 'uri' => (string) ($menu['uri'] ?? ''), + 'order' => $lastOrder + 1, + 'title' => $menu['title'], + 'icon' => (string) ($menu['icon'] ?? ''), + 'uri' => (string) ($menu['uri'] ?? ''), 'extension' => $this->getName(), ]); } diff --git a/src/Extend/Manager.php b/src/Extend/Manager.php index e887c566b7a31bd72d4294c64b1cdc29a68dd681..a8fe1b21bad000763e66301437eda74362e064d2 100644 --- a/src/Extend/Manager.php +++ b/src/Extend/Manager.php @@ -310,7 +310,7 @@ class Manager /** * 获取扩展名称. * - * @param $extension + * @param $extension * @return string */ public function getName($extension) @@ -398,7 +398,7 @@ class Manager /** * 校验扩展包内容是否正确. * - * @param $directory + * @param $directory * @return bool */ protected function checkFiles($directory) diff --git a/src/Extend/ServiceProvider.php b/src/Extend/ServiceProvider.php index d6676e880580c6b3a6f8ef7e49a5a3c280e8a8b7..36c0e759198dc2a3064b13bd84dcaac0ca845fbc 100644 --- a/src/Extend/ServiceProvider.php +++ b/src/Extend/ServiceProvider.php @@ -387,13 +387,13 @@ abstract class ServiceProvider extends LaravelServiceProvider /** * 注册路由. * - * @param $callback + * @param $callback */ public function registerRoutes($callback) { Admin::app()->routes(function ($router) use ($callback) { $router->group([ - 'prefix' => config('admin.route.prefix'), + 'prefix' => config('admin.route.prefix'), 'middleware' => config('admin.route.middleware'), ], $callback); }); @@ -553,7 +553,7 @@ abstract class ServiceProvider extends LaravelServiceProvider if ($this->js || $this->css) { $asset->alias($this->getName(), [ - 'js' => $this->formatAssetFiles($this->js), + 'js' => $this->formatAssetFiles($this->js), 'css' => $this->formatAssetFiles($this->css), ]); } @@ -587,7 +587,7 @@ abstract class ServiceProvider extends LaravelServiceProvider } /** - * @param $config + * @param $config * @return false|string */ protected function serializeConfig($config) @@ -596,7 +596,7 @@ abstract class ServiceProvider extends LaravelServiceProvider } /** - * @param $config + * @param $config * @return array */ protected function unserializeConfig($config) diff --git a/src/Extend/VersionManager.php b/src/Extend/VersionManager.php index ec4f21b3f4c3519b945cc40c4addda6e6b496028..4ebe9f20af12a15a5b64f623ee3a52fe73277c94 100644 --- a/src/Extend/VersionManager.php +++ b/src/Extend/VersionManager.php @@ -267,12 +267,12 @@ class VersionManager if ($version && ! $currentVersion) { Extension::query()->create([ - 'name' => $name, + 'name' => $name, 'version' => $version, ]); } elseif ($version && $currentVersion) { Extension::query()->where('name', $name)->update([ - 'version' => $version, + 'version' => $version, 'updated_at' => new Carbon, ]); } elseif ($currentVersion) { @@ -285,10 +285,10 @@ class VersionManager protected function applyDatabaseComment($name, $version, $comment) { ExtensionHistory::query()->create([ - 'name' => $name, - 'type' => static::HISTORY_TYPE_COMMENT, + 'name' => $name, + 'type' => static::HISTORY_TYPE_COMMENT, 'version' => $version, - 'detail' => $comment, + 'detail' => $comment, ]); } @@ -313,10 +313,10 @@ class VersionManager $this->updater->setUp($this->resolveUpdater($name, $updateFile), function () use ($name, $version, $script) { ExtensionHistory::query()->create([ - 'name' => $name, - 'type' => static::HISTORY_TYPE_SCRIPT, + 'name' => $name, + 'type' => static::HISTORY_TYPE_SCRIPT, 'version' => $version, - 'detail' => $script, + 'detail' => $script, ]); }); diff --git a/src/Form.php b/src/Form.php index b6cb6cb9d8d911a0967392dc133e549fbfa0f84b..d67f042af263887331eda5e499706a4433c41661 100755 --- a/src/Form.php +++ b/src/Form.php @@ -100,8 +100,8 @@ class Form implements Renderable use Concerns\HasRows; use Concerns\HasTabs; use Macroable { - __call as macroCall; - } + __call as macroCall; + } /** * Remove flag in `has many` form. @@ -116,62 +116,62 @@ class Form implements Renderable * @var array */ protected static $availableFields = [ - 'button' => Field\Button::class, - 'checkbox' => Field\Checkbox::class, - 'currency' => Field\Currency::class, - 'date' => Field\Date::class, - 'dateRange' => Field\DateRange::class, - 'datetime' => Field\Datetime::class, - 'datetimeRange' => Field\DatetimeRange::class, - 'decimal' => Field\Decimal::class, - 'display' => Field\Display::class, - 'divider' => Field\Divide::class, - 'embeds' => Field\Embeds::class, - 'editor' => Field\Editor::class, - 'email' => Field\Email::class, - 'hidden' => Field\Hidden::class, - 'id' => Field\Id::class, - 'ip' => Field\Ip::class, - 'map' => Field\Map::class, - 'mobile' => Field\Mobile::class, - 'month' => Field\Month::class, - 'multipleSelect' => Field\MultipleSelect::class, - 'number' => Field\Number::class, - 'password' => Field\Password::class, - 'radio' => Field\Radio::class, - 'rate' => Field\Rate::class, - 'select' => Field\Select::class, - 'slider' => Field\Slider::class, - 'switch' => Field\SwitchField::class, - 'text' => Field\Text::class, - 'textarea' => Field\Textarea::class, - 'time' => Field\Time::class, - 'timeRange' => Field\TimeRange::class, - 'url' => Field\Url::class, - 'year' => Field\Year::class, - 'html' => Field\Html::class, - 'tags' => Field\Tags::class, - 'icon' => Field\Icon::class, - 'captcha' => Field\Captcha::class, - 'listbox' => Field\Listbox::class, - 'file' => Field\File::class, - 'image' => Field\Image::class, - 'multipleFile' => Field\MultipleFile::class, - 'multipleImage' => Field\MultipleImage::class, - 'hasMany' => Field\HasMany::class, - 'tree' => Field\Tree::class, - 'table' => Field\Table::class, - 'list' => Field\ListField::class, - 'timezone' => Field\Timezone::class, - 'keyValue' => Field\KeyValue::class, - 'tel' => Field\Tel::class, - 'markdown' => Field\Markdown::class, - 'range' => Field\Range::class, - 'color' => Field\Color::class, - 'array' => Field\ArrayField::class, - 'selectTable' => Field\SelectTable::class, + 'button' => Field\Button::class, + 'checkbox' => Field\Checkbox::class, + 'currency' => Field\Currency::class, + 'date' => Field\Date::class, + 'dateRange' => Field\DateRange::class, + 'datetime' => Field\Datetime::class, + 'datetimeRange' => Field\DatetimeRange::class, + 'decimal' => Field\Decimal::class, + 'display' => Field\Display::class, + 'divider' => Field\Divide::class, + 'embeds' => Field\Embeds::class, + 'editor' => Field\Editor::class, + 'email' => Field\Email::class, + 'hidden' => Field\Hidden::class, + 'id' => Field\Id::class, + 'ip' => Field\Ip::class, + 'map' => Field\Map::class, + 'mobile' => Field\Mobile::class, + 'month' => Field\Month::class, + 'multipleSelect' => Field\MultipleSelect::class, + 'number' => Field\Number::class, + 'password' => Field\Password::class, + 'radio' => Field\Radio::class, + 'rate' => Field\Rate::class, + 'select' => Field\Select::class, + 'slider' => Field\Slider::class, + 'switch' => Field\SwitchField::class, + 'text' => Field\Text::class, + 'textarea' => Field\Textarea::class, + 'time' => Field\Time::class, + 'timeRange' => Field\TimeRange::class, + 'url' => Field\Url::class, + 'year' => Field\Year::class, + 'html' => Field\Html::class, + 'tags' => Field\Tags::class, + 'icon' => Field\Icon::class, + 'captcha' => Field\Captcha::class, + 'listbox' => Field\Listbox::class, + 'file' => Field\File::class, + 'image' => Field\Image::class, + 'multipleFile' => Field\MultipleFile::class, + 'multipleImage' => Field\MultipleImage::class, + 'hasMany' => Field\HasMany::class, + 'tree' => Field\Tree::class, + 'table' => Field\Table::class, + 'list' => Field\ListField::class, + 'timezone' => Field\Timezone::class, + 'keyValue' => Field\KeyValue::class, + 'tel' => Field\Tel::class, + 'markdown' => Field\Markdown::class, + 'range' => Field\Range::class, + 'color' => Field\Color::class, + 'array' => Field\ArrayField::class, + 'selectTable' => Field\SelectTable::class, 'multipleSelectTable' => Field\MultipleSelectTable::class, - 'autocomplete' => Field\Autocomplete::class, + 'autocomplete' => Field\Autocomplete::class, ]; /** @@ -351,7 +351,7 @@ class Form implements Renderable } /** - * @param $column + * @param $column * @return $this */ public function removeField($column) @@ -504,7 +504,7 @@ class Form implements Renderable /** * Generate a edit form. * - * @param $id + * @param $id * @return $this */ public function edit($id) @@ -540,7 +540,7 @@ class Form implements Renderable /** * Destroy data entity and remove files. * - * @param $id + * @param $id * @return mixed */ public function destroy($id) @@ -633,7 +633,7 @@ class Form implements Renderable $this->builder->setResourceId($id); - if (($response = $this->callSaved($id))) { + if ($response = $this->callSaved($id)) { return $this->sendResponse($response); } @@ -678,7 +678,7 @@ class Form implements Renderable $this->build(); - if (($response = $this->callSubmitted())) { + if ($response = $this->callSubmitted()) { return $response; } @@ -695,7 +695,7 @@ class Form implements Renderable return $this->validationErrorsResponse($validationMessages); } - if (($response = $this->prepare($this->inputs))) { + if ($response = $this->prepare($this->inputs)) { return $response; } } @@ -776,7 +776,7 @@ class Form implements Renderable /** * Handle update. * - * @param $id + * @param $id * @param array|null $data * @param string|null $redirectTo * @return \Illuminate\Http\JsonResponse|\Illuminate\Http\RedirectResponse||Response @@ -919,8 +919,8 @@ class Form implements Renderable } /** - * @param $key - * @param $redirectTo + * @param $key + * @param $redirectTo * @return string|null */ public function getRedirectUrl($key, $redirectTo = null) @@ -1021,7 +1021,7 @@ class Form implements Renderable /** * Prepare input data for insert. * - * @param $inserts + * @param $inserts * @return array */ public function prepareInsert($inserts) @@ -1062,7 +1062,7 @@ class Form implements Renderable } /** - * @param $keys + * @param $keys * @return $this */ public function forgetIgnored($keys) diff --git a/src/Form/Builder.php b/src/Form/Builder.php index b4ecff40274fd04db4d392976efcdb0e8e7d5215..77aba98fbb31310cf37837b5c425cece8b6f2073 100755 --- a/src/Form/Builder.php +++ b/src/Form/Builder.php @@ -229,7 +229,7 @@ class Builder implements FieldsCollection /** * Returns builder is $mode. * - * @param $mode + * @param $mode * @return bool */ public function isMode($mode) @@ -270,7 +270,7 @@ class Builder implements FieldsCollection /** * Set resource Id. * - * @param $id + * @param $id * @return mixed|void */ public function setResourceId($id) @@ -491,7 +491,7 @@ class Builder implements FieldsCollection } /** - * @param $id + * @param $id * @return void */ public function setElementId($id) @@ -679,14 +679,14 @@ class Builder implements FieldsCollection protected function defaultVariables() { return [ - 'form' => $this, - 'tabObj' => $this->form->getTab(), - 'width' => $this->width, - 'elementId' => $this->getElementId(), + 'form' => $this, + 'tabObj' => $this->form->getTab(), + 'width' => $this->width, + 'elementId' => $this->getElementId(), 'showHeader' => $this->showHeader, - 'fields' => $this->fields(), - 'rows' => $this->rows(), - 'layout' => $this->layout(), + 'fields' => $this->fields(), + 'rows' => $this->rows(), + 'layout' => $this->layout(), ]; } diff --git a/src/Form/Concerns/HasFieldValidator.php b/src/Form/Concerns/HasFieldValidator.php index 4b009216e3f0c735f31b23c844642db192259831..02a5841a786327300e8f1a23fbc97db5bc91141f 100644 --- a/src/Form/Concerns/HasFieldValidator.php +++ b/src/Form/Concerns/HasFieldValidator.php @@ -223,8 +223,8 @@ trait HasFieldValidator } /** - * @param $rules - * @param $rule + * @param $rules + * @param $rule * @return void */ protected function deleteRuleByKeyword(&$rules, $rule) @@ -303,8 +303,8 @@ trait HasFieldValidator } /** - * @param $rules - * @param $rule + * @param $rules + * @param $rule * @return bool */ protected function isRuleExists($rules, $rule) diff --git a/src/Form/Concerns/HasFields.php b/src/Form/Concerns/HasFields.php index 76da2ab771251be73e02f9cd18b00420f0736a15..00f12cacff22e31dc65ef7fa79e6943516420227 100644 --- a/src/Form/Concerns/HasFields.php +++ b/src/Form/Concerns/HasFields.php @@ -59,7 +59,7 @@ trait HasFields /** * Remove Field. * - * @param $column + * @param $column * @return void */ public function removeField($column) diff --git a/src/Form/Concerns/HasFiles.php b/src/Form/Concerns/HasFiles.php index 210e0cc05008cfb7f8fb4afdb4ebd90c6689e98d..5733fe27d157f913855debe58e86ce290176ccac 100644 --- a/src/Form/Concerns/HasFiles.php +++ b/src/Form/Concerns/HasFiles.php @@ -210,8 +210,8 @@ trait HasFiles $input[$relation] = [ $relationKey => [ - $keyName => $relationKey, - $input['_column'] => '', + $keyName => $relationKey, + $input['_column'] => '', NestedForm::REMOVE_FLAG_NAME => null, ], ]; diff --git a/src/Form/Field.php b/src/Form/Field.php index c6f9a4285656cf6273ab178744f0c00d670ee6c3..1534a87949b66f3ea3be39994ac21b6029b14bfa 100755 --- a/src/Form/Field.php +++ b/src/Form/Field.php @@ -897,15 +897,15 @@ class Field implements Renderable { if ($this->horizontal) { return [ - 'label' => "col-md-{$this->width['label']} {$this->getLabelClass()}", - 'field' => "col-md-{$this->width['field']} {$this->getFieldClass()}", + 'label' => "col-md-{$this->width['label']} {$this->getLabelClass()}", + 'field' => "col-md-{$this->width['field']} {$this->getFieldClass()}", 'form-group' => "form-group row {$this->getFormGroupClass()}", ]; } return [ - 'label' => $this->getLabelClass(), - 'field' => $this->getFieldClass(), + 'label' => $this->getLabelClass(), + 'field' => $this->getFieldClass(), 'form-group' => $this->getFormGroupClass(), ]; } @@ -1052,7 +1052,7 @@ class Field implements Renderable /** * Remove element class. * - * @param $class + * @param $class * @return $this */ public function removeElementClass($class) @@ -1147,20 +1147,20 @@ class Field implements Renderable public function defaultVariables() { return [ - '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(), + '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(), - 'selector' => $this->getElementClassSelector(), - 'options' => $this->options, + 'disabled' => $this->attributes['disabled'] ?? false, + 'formId' => $this->getFormElementId(), + 'selector' => $this->getElementClassSelector(), + 'options' => $this->options, ]; } diff --git a/src/Form/Field/CanCascadeFields.php b/src/Form/Field/CanCascadeFields.php index 1f2599ad3b22115e88a4114c86110671386d1da2..3f107cd36a83696ecd9ecaaa1bc2733aa9b7e5e4 100644 --- a/src/Form/Field/CanCascadeFields.php +++ b/src/Form/Field/CanCascadeFields.php @@ -23,9 +23,9 @@ trait CanCascadeFields protected $cascadeGroups = []; /** - * @param $operator - * @param $value - * @param $closure + * @param $operator + * @param $value + * @param $closure * @return $this */ public function when($operator, $value, $closure = null) @@ -80,8 +80,8 @@ trait CanCascadeFields ($this->parent ?: $this->form)->cascadeGroup($closure, [ 'column' => $this->column(), - 'index' => count($this->conditions) - 1, - 'class' => $this->getCascadeClass($value, $operator), + 'index' => count($this->conditions) - 1, + 'class' => $this->getCascadeClass($value, $operator), ]); } @@ -142,9 +142,9 @@ JS $cascadeGroups = collect($this->conditions)->map(function ($condition) { return [ - 'class' => $this->getCascadeClass($condition['value'], $condition['operator']), + 'class' => $this->getCascadeClass($condition['value'], $condition['operator']), 'operator' => $condition['operator'], - 'value' => $condition['value'], + 'value' => $condition['value'], ]; })->toJson(); diff --git a/src/Form/Field/CanLoadFields.php b/src/Form/Field/CanLoadFields.php index 3cb9684943b31782806b81f7ba09d01fdce2e57c..15bf52924534c3d5deed87fda6328244682109e1 100644 --- a/src/Form/Field/CanLoadFields.php +++ b/src/Form/Field/CanLoadFields.php @@ -43,9 +43,9 @@ trait CanLoadFields }, (array) $sourceUrls)); return $this->addVariables(['loads' => [ - 'fields' => $fieldsStr, - 'urls' => $urlsStr, - 'idField' => $idField, + 'fields' => $fieldsStr, + 'urls' => $urlsStr, + 'idField' => $idField, 'textField' => $textField, ]]); } diff --git a/src/Form/Field/Currency.php b/src/Form/Field/Currency.php index 33a7782daccbace5079c82630e05d971c9f61593..1fddcc1bede0ac1a790545923867c5e7c187c24c 100755 --- a/src/Form/Field/Currency.php +++ b/src/Form/Field/Currency.php @@ -12,11 +12,11 @@ class Currency extends Text * @var array */ protected $options = [ - 'alias' => 'currency', - 'radixPoint' => '.', - 'prefix' => '', + 'alias' => 'currency', + 'radixPoint' => '.', + 'prefix' => '', 'removeMaskOnSubmit' => true, - 'rightAlign' => false, + 'rightAlign' => false, ]; /** diff --git a/src/Form/Field/Decimal.php b/src/Form/Field/Decimal.php index db494757aeb1c21e6ed944f9bef1c60d96186bf4..d43227f04e9732c9f473327197201de746bfd579 100755 --- a/src/Form/Field/Decimal.php +++ b/src/Form/Field/Decimal.php @@ -10,7 +10,7 @@ class Decimal extends Text * @var array */ protected $options = [ - 'alias' => 'decimal', + 'alias' => 'decimal', 'rightAlign' => false, ]; diff --git a/src/Form/Field/Editor.php b/src/Form/Field/Editor.php index ca990871172be7cbc6446157a742c4cd6c1a097b..eff44db12c115796f37c58d40bcba5c61000d004 100755 --- a/src/Form/Field/Editor.php +++ b/src/Form/Field/Editor.php @@ -134,8 +134,8 @@ class Editor extends Field $url, [ '_token' => csrf_token(), - 'disk' => $this->disk, - 'dir' => $this->imageUploadDirectory, + 'disk' => $this->disk, + 'dir' => $this->imageUploadDirectory, ] ); } diff --git a/src/Form/Field/File.php b/src/Form/Field/File.php index ea3fcfe3737707418fccfb10256815db6ea5d5a9..53310b3ccabaa2657ca16dbac2f807c2d307e17d 100755 --- a/src/Form/Field/File.php +++ b/src/Form/Field/File.php @@ -68,13 +68,14 @@ class File extends Field implements UploadFieldInterface $requiredIf = null; $fileLimit = $this->options['fileNumLimit'] ?? 1; - if (!empty($value) && $fileLimit > 1){ - $rules[$this->column][] = function($atribute,$value,$fail)use($fileLimit){ + if (! empty($value) && $fileLimit > 1) { + $rules[$this->column][] = function ($atribute, $value, $fail) use ($fileLimit) { $value = array_filter(is_array($value) ? $value : explode(',', $value)); - if (count($value) > $fileLimit ) { + if (count($value) > $fileLimit) { $fail(trans('admin.uploader.max_file_limit', ['attribute' => $this->label, 'max' => $fileLimit])); } }; + return Validator::make($input, $rules, $this->getValidationMessages(), $attributes); } @@ -136,9 +137,9 @@ class File extends Field implements UploadFieldInterface foreach (Helper::array($this->value()) as $value) { $previews[] = [ - 'id' => $value, + 'id' => $value, 'path' => Helper::basename($value), - 'url' => $this->objectUrl($value), + 'url' => $this->objectUrl($value), ]; } @@ -165,9 +166,9 @@ class File extends Field implements UploadFieldInterface $this->formatValue(); $this->addVariables([ - 'fileType' => $this->options['isImage'] ? '' : 'file', + 'fileType' => $this->options['isImage'] ? '' : 'file', 'showUploadBtn' => ($this->options['autoUpload'] ?? false) ? false : true, - 'options' => JavaScript::format($this->options), + 'options' => JavaScript::format($this->options), ]); return parent::render(); diff --git a/src/Form/Field/HasMany.php b/src/Form/Field/HasMany.php index d9be9ef8e86c197696befebd9bbebbf3e4a3d153..ca3869a75c993fedc0146f8ba88e5184752b7f5e 100755 --- a/src/Form/Field/HasMany.php +++ b/src/Form/Field/HasMany.php @@ -71,8 +71,8 @@ class HasMany extends Field */ protected $views = [ 'default' => 'admin::form.hasmany', - 'tab' => 'admin::form.hasmanytab', - 'table' => 'admin::form.hasmanytable', + 'tab' => 'admin::form.hasmanytab', + 'table' => 'admin::form.hasmanytable', ]; /** @@ -90,7 +90,7 @@ class HasMany extends Field /** * Create a new HasMany field instance. * - * @param $relationName + * @param $relationName * @param array $arguments */ public function __construct($relationName, $arguments = []) @@ -312,7 +312,6 @@ class HasMany extends Field * in the HasMany relation, has many data/field set, $set is field set in the below */ foreach (Arr::get($input, $this->column) as $index => $set) { - /* * foreach the field set to find the corresponding $column */ @@ -567,12 +566,12 @@ class HasMany extends Field $this->view = $this->view ?: $this->views[$this->viewMode]; $this->addVariables([ - 'forms' => $this->buildRelatedForms(), - 'template' => $this->buildNestedForm()->render(), - 'relationName' => $this->relationName, - 'options' => $this->options, - 'count' => count($this->value()), - 'columnClass' => $this->columnClass, + 'forms' => $this->buildRelatedForms(), + 'template' => $this->buildNestedForm()->render(), + 'relationName' => $this->relationName, + 'options' => $this->options, + 'count' => count($this->value()), + 'columnClass' => $this->columnClass, ]); return parent::render(); @@ -618,14 +617,14 @@ class HasMany extends Field $this->view = $this->view ?: $this->views[$this->viewMode]; $this->addVariables([ - 'headers' => $headers, - 'forms' => $this->buildRelatedForms(), - 'template' => $template, + 'headers' => $headers, + 'forms' => $this->buildRelatedForms(), + 'template' => $template, 'relationName' => $this->relationName, - 'options' => $this->options, - 'count' => count($this->value()), - 'columnClass' => $this->columnClass, - 'parentKey' => $this->getNestedFormDefaultKeyName(), + 'options' => $this->options, + 'count' => count($this->value()), + 'columnClass' => $this->columnClass, + 'parentKey' => $this->getNestedFormDefaultKeyName(), ]); return parent::render(); diff --git a/src/Form/Field/ImageField.php b/src/Form/Field/ImageField.php index 4929da2a7ff1493600a4edc39cbc002ab8fe2249..3cc54dc0c7b99203d6e932ac6c0eb26420d365fe 100755 --- a/src/Form/Field/ImageField.php +++ b/src/Form/Field/ImageField.php @@ -84,7 +84,7 @@ trait ImageField } $this->interventionCalls[] = [ - 'method' => static::$interventionAlias[$method] ?? $method, + 'method' => static::$interventionAlias[$method] ?? $method, 'arguments' => $arguments, ]; diff --git a/src/Form/Field/KeyValue.php b/src/Form/Field/KeyValue.php index 0a6bcf353d5c10d338fbc850fa0cff9554560cb6..71875e7be52c0eae9fca0c7d97204a48e7f0e65e 100644 --- a/src/Form/Field/KeyValue.php +++ b/src/Form/Field/KeyValue.php @@ -107,8 +107,8 @@ class KeyValue extends Field $value = $this->value(); $this->addVariables([ - 'count' => $value ? count($value) : 0, - 'keyLabel' => $this->getKeyLabel(), + 'count' => $value ? count($value) : 0, + 'keyLabel' => $this->getKeyLabel(), 'valueLabel' => $this->getValueLabel(), ]); diff --git a/src/Form/Field/Listbox.php b/src/Form/Field/Listbox.php index a2ed16766154507ade92f12e9079b4e924440f57..b05ab6f1188be470a366a6ecebdbbc7c6f271fc9 100755 --- a/src/Form/Field/Listbox.php +++ b/src/Form/Field/Listbox.php @@ -21,10 +21,10 @@ class Listbox extends MultipleSelect public function render() { $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'), + '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'), ]); diff --git a/src/Form/Field/Markdown.php b/src/Form/Field/Markdown.php index 8bfce54068c1d72e65280caa3ece9f41900f8aba..cde60d95c1b965b839c655ea7f0f1cc787e197e2 100644 --- a/src/Form/Field/Markdown.php +++ b/src/Form/Field/Markdown.php @@ -18,24 +18,24 @@ class Markdown extends Field * @var array */ protected $options = [ - 'height' => 500, - 'codeFold' => true, + 'height' => 500, + 'codeFold' => true, 'saveHTMLToTextarea' => true, // 保存 HTML 到 Textarea - 'searchReplace' => true, - 'emoji' => true, - 'taskList' => true, - 'tocm' => true, // Using [TOCM] - 'tex' => true, // 开启科学公式TeX语言支持,默认关闭 - 'flowChart' => false, // 流程图支持,默认关闭 - 'sequenceDiagram' => false, // 时序/序列图支持,默认关闭, - 'imageUpload' => true, - 'autoFocus' => true, + 'searchReplace' => true, + 'emoji' => true, + 'taskList' => true, + 'tocm' => true, // Using [TOCM] + 'tex' => true, // 开启科学公式TeX语言支持,默认关闭 + 'flowChart' => false, // 流程图支持,默认关闭 + 'sequenceDiagram' => false, // 时序/序列图支持,默认关闭, + 'imageUpload' => true, + 'autoFocus' => true, ]; protected $language; protected $defaultLangs = [ - 'en' => '@admin/dcat/plugins/editor-md/languages/en.js', + 'en' => '@admin/dcat/plugins/editor-md/languages/en.js', 'zh_TW' => '@admin/dcat/plugins/editor-md/languages/zh-tw.js', ]; @@ -138,8 +138,8 @@ class Markdown extends Field $url, [ '_token' => csrf_token(), - 'disk' => $this->disk, - 'dir' => $this->imageUploadDirectory, + 'disk' => $this->disk, + 'dir' => $this->imageUploadDirectory, ] ); } diff --git a/src/Form/Field/Number.php b/src/Form/Field/Number.php index 396bce0629fbe8a22ade771ed65cf99c0b6aace2..6293abc1d4758de6ddc177e297780ab53eccf1da 100755 --- a/src/Form/Field/Number.php +++ b/src/Form/Field/Number.php @@ -7,10 +7,10 @@ class Number extends Text protected $view = 'admin::form.number'; protected $options = [ - 'upClass' => 'primary shadow-0', + 'upClass' => 'primary shadow-0', 'downClass' => 'light shadow-0', - 'center' => true, - 'disabled' => false, + 'center' => true, + 'disabled' => false, ]; /** diff --git a/src/Form/Field/Select.php b/src/Form/Field/Select.php index 4b97fe72228fd59f00cc105c1d618103cb17797b..623d9d248741662a4112e89fd3bee1364b1d1336 100755 --- a/src/Form/Field/Select.php +++ b/src/Form/Field/Select.php @@ -167,8 +167,8 @@ class Select extends Field * Load options from ajax results. * * @param string $url - * @param $idField - * @param $textField + * @param $idField + * @param $textField * @return $this */ public function ajax(string $url, string $idField = 'id', string $textField = 'text') @@ -214,9 +214,9 @@ class Select extends Field public function render() { $this->addDefaultConfig([ - 'allowClear' => true, + 'allowClear' => true, 'placeholder' => [ - 'id' => '', + 'id' => '', 'text' => $this->placeholder(), ], ]); @@ -224,9 +224,9 @@ class Select extends Field $this->formatOptions(); $this->addVariables([ - 'options' => $this->options, - 'groups' => $this->groups, - 'configs' => $this->config, + 'options' => $this->options, + 'groups' => $this->groups, + 'configs' => $this->config, 'cascadeScript' => $this->getCascadeScript(), ]); diff --git a/src/Form/Field/SelectTable.php b/src/Form/Field/SelectTable.php index d7a71e9056eaf3c1910b41968df2574afadb83ae..f9c259bd7e04e750b0e36d0d9f5e51efbb512598 100644 --- a/src/Form/Field/SelectTable.php +++ b/src/Form/Field/SelectTable.php @@ -102,8 +102,8 @@ class SelectTable extends Field /** * 设置选中的key以及标题字段. * - * @param $visibleColumn - * @param $key + * @param $visibleColumn + * @param $key * @return $this */ public function pluck(?string $visibleColumn, ?string $key = 'id') @@ -199,11 +199,11 @@ class SelectTable extends Field ->defaultAttribute('name', $this->getElementName()); $this->addVariables([ - 'prepend' => $this->prepend, - 'append' => $this->append, - 'style' => $this->style, - 'dialog' => $this->dialog->render(), - 'placeholder' => $this->placeholder(), + 'prepend' => $this->prepend, + 'append' => $this->append, + 'style' => $this->style, + 'dialog' => $this->dialog->render(), + 'placeholder' => $this->placeholder(), 'dialogSelector' => $this->dialog->getElementSelector(), ]); diff --git a/src/Form/Field/Slider.php b/src/Form/Field/Slider.php index 70ea6bf04167e07335b2d5222a25c2ed906d05bf..a5cd3a37189b99f7c5120ef9dbaa0b11e355d1b1 100755 --- a/src/Form/Field/Slider.php +++ b/src/Form/Field/Slider.php @@ -7,8 +7,8 @@ use Dcat\Admin\Form\Field; class Slider extends Field { protected $options = [ - 'type' => 'single', + 'type' => 'single', 'prettify' => false, - 'hasGrid' => true, + 'hasGrid' => true, ]; } diff --git a/src/Form/Field/Tags.php b/src/Form/Field/Tags.php index 7562e61a75d8b1fb6ae896c83ff4b7c13d2767e2..4c7b0878b784ad8faa28bd784eb88360ce44e5d7 100755 --- a/src/Form/Field/Tags.php +++ b/src/Form/Field/Tags.php @@ -52,8 +52,8 @@ class Tags extends Field /** * Set visible column and key of data. * - * @param $visibleColumn - * @param $key + * @param $visibleColumn + * @param $key * @return $this */ public function pluck($visibleColumn, $key = 'id') @@ -152,8 +152,8 @@ class Tags extends Field * Load options from ajax results. * * @param string $url - * @param $idField - * @param $textField + * @param $idField + * @param $textField * @return $this */ public function ajax(string $url, string $idField = 'id', string $textField = 'text') @@ -183,7 +183,7 @@ class Tags extends Field } $this->addVariables([ - 'options' => $options, + 'options' => $options, 'keyAsValue' => $this->keyAsValue, ]); diff --git a/src/Form/Field/Text.php b/src/Form/Field/Text.php index 445ec0fe468d8e02e854538380b721f9a3a67d62..8ac2873b6ba95029b8852bc6d3de25d1612545cc 100755 --- a/src/Form/Field/Text.php +++ b/src/Form/Field/Text.php @@ -38,7 +38,7 @@ class Text extends Field $this->addVariables([ 'prepend' => $this->prepend, - 'append' => $this->append, + 'append' => $this->append, ]); return parent::render(); @@ -76,7 +76,7 @@ class Text extends Field } $attributes = [ - 'data-match' => $field->getElementClassSelector(), + 'data-match' => $field->getElementClassSelector(), 'data-match-error' => str_replace( [':attribute', ':other'], [$field->label(), $this->label()], @@ -97,7 +97,7 @@ class Text extends Field $this->rules('nullable|min:'.$length); return $this->attribute([ - 'data-minlength' => $length, + 'data-minlength' => $length, 'data-minlength-error' => str_replace( [':attribute', ':min'], [$this->label, $length], @@ -124,7 +124,7 @@ JS $this->rules('max:'.$length); return $this->attribute([ - 'data-maxlength' => $length, + 'data-maxlength' => $length, 'data-maxlength-error' => str_replace( [':attribute', ':max'], [$this->label, $length], diff --git a/src/Form/Field/Tree.php b/src/Form/Field/Tree.php index f139c161f6991a89f0ae67e637cfc23e8ec03bb6..afa4b91d4baea7bfce65df10cf3d719f6c817648 100755 --- a/src/Form/Field/Tree.php +++ b/src/Form/Field/Tree.php @@ -11,11 +11,11 @@ class Tree extends Field { protected $options = [ 'plugins' => ['checkbox', 'types'], - 'core' => [ + 'core' => [ 'check_callback' => true, 'themes' => [ - 'name' => 'proton', + 'name' => 'proton', 'responsive' => true, ], ], @@ -24,7 +24,7 @@ class Tree extends Field 'three_state' => true, ], 'types' => [ - 'default' => [ + 'default' => [ 'icon' => false, ], ], @@ -37,8 +37,8 @@ class Tree extends Field protected $expand = true; protected $columnNames = [ - 'id' => 'id', - 'text' => 'name', + 'id' => 'id', + 'text' => 'name', 'parent' => 'parent_id', ]; @@ -176,10 +176,10 @@ class Tree extends Field } $nodes[] = [ - 'id' => $v[$idColumn], - 'text' => $v[$textColumn] ?? null, + 'id' => $v[$idColumn], + 'text' => $v[$textColumn] ?? null, 'parent' => $parentId, - 'state' => $v['state'], + 'state' => $v['state'], ]; } @@ -261,10 +261,10 @@ class Tree extends Field $this->addVariables([ 'checkboxes' => $checkboxes, - 'nodes' => $this->nodes, - 'expand' => $this->expand, - 'disabled' => empty($this->attributes['disabled']) ? '' : 'disabled', - 'parents' => $this->parents, + 'nodes' => $this->nodes, + 'expand' => $this->expand, + 'disabled' => empty($this->attributes['disabled']) ? '' : 'disabled', + 'parents' => $this->parents, ]); return parent::render(); diff --git a/src/Form/Field/UploadField.php b/src/Form/Field/UploadField.php index b6cfd36befd7e78d02f649e79c89b5db46b05743..de9c9c3417d193b8baeeb223ef6bfc8d0f6ad79b 100755 --- a/src/Form/Field/UploadField.php +++ b/src/Form/Field/UploadField.php @@ -93,7 +93,7 @@ trait UploadField /** * If name already exists, rename it. * - * @param $file + * @param $file * @return void */ public function renameIfExists(UploadedFile $file) @@ -380,7 +380,7 @@ trait UploadField /** * Destroy original files. * - * @param $file + * @param $file */ public function destroyIfChanged($file) { @@ -483,7 +483,7 @@ trait UploadField } /** - * @param $permission + * @param $permission * @return $this */ public function storagePermission($permission) diff --git a/src/Form/Field/WebUploader.php b/src/Form/Field/WebUploader.php index 525426d874bfc6a8b6c2a1a165b993214d38cb3f..64110d4392b7706ff01a8c4970c70820b370e51a 100755 --- a/src/Form/Field/WebUploader.php +++ b/src/Form/Field/WebUploader.php @@ -217,29 +217,29 @@ trait WebUploader $key = optional($this->form)->getKey(); $defaultOptions = [ - 'name' => WebUploaderHelper::FILE_NAME, - 'fileVal' => WebUploaderHelper::FILE_NAME, - 'isImage' => false, - 'removable' => false, - 'chunked' => false, - 'fileNumLimit' => 10, + 'name' => WebUploaderHelper::FILE_NAME, + 'fileVal' => WebUploaderHelper::FILE_NAME, + 'isImage' => false, + 'removable' => false, + 'chunked' => false, + 'fileNumLimit' => 10, // 禁掉全局的拖拽功能。这样不会出现图片拖进页面的时候,把图片打开。 - 'disableGlobalDnd' => true, - 'fileSizeLimit' => 20971520000, // 20000M + 'disableGlobalDnd' => true, + 'fileSizeLimit' => 20971520000, // 20000M 'fileSingleSizeLimit' => 10485760, // 10M - 'elementName' => $this->getElementName(), // 字段name属性值 - 'lang' => trans('admin.uploader'), - 'compress' => false, - 'accept' => [], + 'elementName' => $this->getElementName(), // 字段name属性值 + 'lang' => trans('admin.uploader'), + 'compress' => false, + 'accept' => [], 'deleteData' => [ static::FILE_DELETE_FLAG => '', - 'primary_key' => $key, + 'primary_key' => $key, ], 'formData' => [ - '_id' => Str::random(), - '_token' => csrf_token(), + '_id' => Str::random(), + '_token' => csrf_token(), 'upload_column' => $this->column(), - 'primary_key' => $key, + 'primary_key' => $key, ], ]; diff --git a/src/Form/Footer.php b/src/Form/Footer.php index d8e09c73e0de11a2148d4e62c6b0e3d8db7a3cab..403a278c781b657fe98f2e118ccbdea632a6609d 100755 --- a/src/Form/Footer.php +++ b/src/Form/Footer.php @@ -229,9 +229,9 @@ class Footer implements Renderable public function render() { $data = [ - 'buttons' => $this->buttons, + 'buttons' => $this->buttons, 'checkboxes' => $this->buildCheckboxes(), - 'width' => $this->builder->getWidth(), + 'width' => $this->builder->getWidth(), ]; $data = array_merge($data, $this->data); diff --git a/src/Form/NestedForm.php b/src/Form/NestedForm.php index 7c799264a8eacc47221ba355e2549eb77699e34f..9fd8a9a1824533ea7b459a9ec39b49912a8bfe33 100755 --- a/src/Form/NestedForm.php +++ b/src/Form/NestedForm.php @@ -305,7 +305,7 @@ class NestedForm extends WidgetForm $field->setRelation([ 'relation' => $this->relationName, - 'key' => $this->key, + 'key' => $this->key, ]); $field::requireAssets(); diff --git a/src/Form/Row.php b/src/Form/Row.php index a0c87b1896ea30577e0aa44be49d070be5494054..e7c9a7f09986164d20df275c4c8d8b6985bfdec7 100755 --- a/src/Form/Row.php +++ b/src/Form/Row.php @@ -217,7 +217,7 @@ class Row implements Renderable $field->horizontal($this->horizontal); $this->fields->push([ - 'width' => $this->fieldWidth, + 'width' => $this->fieldWidth, 'element' => $field, ]); diff --git a/src/Grid.php b/src/Grid.php index 253aa4217991be309178f58b1213fb5be6a2d64f..5095086d227dba24426673d85a40ab72b0609258 100755 --- a/src/Grid.php +++ b/src/Grid.php @@ -153,25 +153,25 @@ class Grid * @var array */ protected $options = [ - 'pagination' => true, - 'filter' => true, - 'actions' => true, - 'quick_edit_button' => false, - 'edit_button' => true, - 'view_button' => true, - 'delete_button' => true, - 'row_selector' => true, - 'create_button' => true, - 'bordered' => false, - 'table_collapse' => true, - 'toolbar' => true, - 'create_mode' => self::CREATE_MODE_DEFAULT, - 'dialog_form_area' => ['700px', '670px'], - 'table_class' => ['table', 'custom-data-table', 'data-table'], - 'scrollbar_x' => false, - 'actions_class' => null, + 'pagination' => true, + 'filter' => true, + 'actions' => true, + 'quick_edit_button' => false, + 'edit_button' => true, + 'view_button' => true, + 'delete_button' => true, + 'row_selector' => true, + 'create_button' => true, + 'bordered' => false, + 'table_collapse' => true, + 'toolbar' => true, + 'create_mode' => self::CREATE_MODE_DEFAULT, + 'dialog_form_area' => ['700px', '670px'], + 'table_class' => ['table', 'custom-data-table', 'data-table'], + 'scrollbar_x' => false, + 'actions_class' => null, 'batch_actions_class' => null, - 'paginator_class' => null, + 'paginator_class' => null, ]; /** @@ -903,7 +903,7 @@ HTML; protected function defaultVariables() { return [ - 'grid' => $this, + 'grid' => $this, 'tableId' => $this->getTableId(), ]; } @@ -1031,9 +1031,9 @@ HTML; $url = Helper::urlWithQuery($url, [static::ASYNC_NAME => 1]); $options = [ - 'selector' => ".async-{$this->getTableId()}", + 'selector' => ".async-{$this->getTableId()}", 'queryName' => $query, - 'url' => $url, + 'url' => $url, ]; if ($this->hasFixColumns()) { @@ -1082,8 +1082,8 @@ JS /** * Dynamically add columns to the grid view. * - * @param $method - * @param $arguments + * @param $method + * @param $arguments * @return Column */ public function __call($method, $arguments) diff --git a/src/Grid/Actions/Delete.php b/src/Grid/Actions/Delete.php index c10ec4708ecf7fb486ad4f210f5a31f9a661a562..bee8c00e250bd744f7fb8e755cf33602aa34fdcd 100644 --- a/src/Grid/Actions/Delete.php +++ b/src/Grid/Actions/Delete.php @@ -21,9 +21,9 @@ class Delete extends RowAction public function render() { $this->setHtmlAttribute([ - 'data-url' => $this->url(), - 'data-message' => "ID - {$this->getKey()}", - 'data-action' => 'delete', + 'data-url' => $this->url(), + 'data-message' => "ID - {$this->getKey()}", + 'data-action' => 'delete', 'data-redirect' => $this->redirectUrl(), ]); diff --git a/src/Grid/Column.php b/src/Grid/Column.php index 267aea57a711f8ca08db742264da21daf0ab3951..6727c68c47483764b98ee71e58eb09e11250cafe 100755 --- a/src/Grid/Column.php +++ b/src/Grid/Column.php @@ -72,29 +72,29 @@ class Column * @var array */ protected static $displayers = [ - 'switch' => Displayers\SwitchDisplay::class, - 'switchGroup' => Displayers\SwitchGroup::class, - 'select' => Displayers\Select::class, - 'image' => Displayers\Image::class, - 'label' => Displayers\Label::class, - 'button' => Displayers\Button::class, - 'link' => Displayers\Link::class, - 'badge' => Displayers\Badge::class, - 'progressBar' => Displayers\ProgressBar::class, - 'radio' => Displayers\Radio::class, - 'checkbox' => Displayers\Checkbox::class, - 'table' => Displayers\Table::class, - 'expand' => Displayers\Expand::class, - 'modal' => Displayers\Modal::class, + 'switch' => Displayers\SwitchDisplay::class, + 'switchGroup' => Displayers\SwitchGroup::class, + 'select' => Displayers\Select::class, + 'image' => Displayers\Image::class, + 'label' => Displayers\Label::class, + 'button' => Displayers\Button::class, + 'link' => Displayers\Link::class, + 'badge' => Displayers\Badge::class, + 'progressBar' => Displayers\ProgressBar::class, + 'radio' => Displayers\Radio::class, + 'checkbox' => Displayers\Checkbox::class, + 'table' => Displayers\Table::class, + 'expand' => Displayers\Expand::class, + 'modal' => Displayers\Modal::class, 'showTreeInDialog' => Displayers\DialogTree::class, - 'qrcode' => Displayers\QRCode::class, - 'downloadable' => Displayers\Downloadable::class, - 'copyable' => Displayers\Copyable::class, - 'orderable' => Displayers\Orderable::class, - 'limit' => Displayers\Limit::class, - 'editable' => Displayers\Input::class, - 'input' => Displayers\Input::class, - 'textarea' => Displayers\Textarea::class, + 'qrcode' => Displayers\QRCode::class, + 'downloadable' => Displayers\Downloadable::class, + 'copyable' => Displayers\Copyable::class, + 'orderable' => Displayers\Orderable::class, + 'limit' => Displayers\Limit::class, + 'editable' => Displayers\Input::class, + 'input' => Displayers\Input::class, + 'textarea' => Displayers\Textarea::class, ]; /** @@ -205,8 +205,8 @@ class Column /** * Extend column displayer. * - * @param $name - * @param $displayer + * @param $name + * @param $displayer */ public static function extend($name, $displayer) { diff --git a/src/Grid/Column/Filter/Between.php b/src/Grid/Column/Filter/Between.php index 010d396a23764fe3bd35fd1720e0086c98d20a0a..64ceb26657d1c4fd9a6e99150ccb14f4597c2876 100644 --- a/src/Grid/Column/Filter/Between.php +++ b/src/Grid/Column/Filter/Between.php @@ -19,7 +19,7 @@ class Between extends Filter { $this->class = [ 'start' => uniqid('column-filter-start-'), - 'end' => uniqid('column-filter-end-'), + 'end' => uniqid('column-filter-end-'), ]; } @@ -122,9 +122,9 @@ class Between extends Filter } $options = [ - 'locale' => config('app.locale'), + 'locale' => config('app.locale'), 'allowInputToggle' => true, - 'format' => $this->dateFormat, + 'format' => $this->dateFormat, 'extraFormats' => ['DD-MM-YYYY', 'DD/MM/YYYY', 'DD.MM.YYYY', 'DD,MM,YYYY'], ]; diff --git a/src/Grid/Column/Filter/Equal.php b/src/Grid/Column/Filter/Equal.php index 095aed1392550e11a7288d73a207288dde561550..edaac727b34500d9887139db5e3e50a29bf30be7 100644 --- a/src/Grid/Column/Filter/Equal.php +++ b/src/Grid/Column/Filter/Equal.php @@ -74,9 +74,9 @@ class Equal extends Filter protected function addDateScript() { $options = [ - 'locale' => config('app.locale'), + 'locale' => config('app.locale'), 'allowInputToggle' => true, - 'format' => $this->dateFormat, + 'format' => $this->dateFormat, ]; $options = admin_javascript_json($options); diff --git a/src/Grid/Column/Filter/In.php b/src/Grid/Column/Filter/In.php index e8c1fcb4c91a8d36f839b65c8d35e1269165c1d2..4f0905c537d22dd32c95b02ed7d1443c63230419 100644 --- a/src/Grid/Column/Filter/In.php +++ b/src/Grid/Column/Filter/In.php @@ -24,7 +24,7 @@ class In extends Filter $this->options = $options; $this->class = [ - 'all' => uniqid('column-filter-all-'), + 'all' => uniqid('column-filter-all-'), 'item' => uniqid('column-filter-item-'), ]; } diff --git a/src/Grid/Column/ValueFilter.php b/src/Grid/Column/ValueFilter.php index d7f2beebc3f5f0ac408a55cb3f3d76adcf59643d..1547e8594612b6892f4334746e848e27c8d384f3 100644 --- a/src/Grid/Column/ValueFilter.php +++ b/src/Grid/Column/ValueFilter.php @@ -82,7 +82,7 @@ class ValueFilter $url = request()->fullUrlWithQuery([ $this->getQueryName() => $this->originalValue(), - $pageName => null, + $pageName => null, ]); return "{$this->wrap($value)}  "; diff --git a/src/Grid/Displayers/Actions.php b/src/Grid/Displayers/Actions.php index 0773f91f2503983c3f6de28810eab276855d1062..53f8022d25958e97ec2c33b44088aaf086aa0c20 100755 --- a/src/Grid/Displayers/Actions.php +++ b/src/Grid/Displayers/Actions.php @@ -33,10 +33,10 @@ class Actions extends AbstractDisplayer * @var array */ protected $actions = [ - 'view' => true, - 'edit' => true, + 'view' => true, + 'edit' => true, 'quickEdit' => false, - 'delete' => true, + 'delete' => true, ]; /** @@ -168,7 +168,7 @@ class Actions extends AbstractDisplayer /** * Set resource of current resource. * - * @param $resource + * @param $resource * @return $this */ public function setResource($resource) diff --git a/src/Grid/Displayers/DialogTree.php b/src/Grid/Displayers/DialogTree.php index 0da4b00020da6123ab90803529d640aa4b855153..822562c50d1f62fe4d51b0741575060b41f62cbb 100644 --- a/src/Grid/Displayers/DialogTree.php +++ b/src/Grid/Displayers/DialogTree.php @@ -16,11 +16,11 @@ class DialogTree extends AbstractDisplayer protected $options = [ 'plugins' => ['checkbox', 'types'], - 'core' => [ + 'core' => [ 'check_callback' => true, 'themes' => [ - 'name' => 'proton', + 'name' => 'proton', 'responsive' => true, ], ], @@ -35,8 +35,8 @@ class DialogTree extends AbstractDisplayer ]; protected $columnNames = [ - 'id' => 'id', - 'text' => 'name', + 'id' => 'id', + 'text' => 'name', 'parent' => 'parent_id', ]; @@ -153,14 +153,14 @@ class DialogTree extends AbstractDisplayer } return Admin::view('admin::grid.displayer.dialogtree', [ - 'value' => $this->format($this->value), - 'nodes' => $this->nodes, - 'title' => $this->title ?: $this->column->getLabel(), - 'options' => $this->options, - 'area' => $this->area, - 'columnNames' => $this->columnNames, - 'url' => $this->url, - 'checkAll' => $this->checkAll, + 'value' => $this->format($this->value), + 'nodes' => $this->nodes, + 'title' => $this->title ?: $this->column->getLabel(), + 'options' => $this->options, + 'area' => $this->area, + 'columnNames' => $this->columnNames, + 'url' => $this->url, + 'checkAll' => $this->checkAll, 'rootParentId' => $this->rootParentId, ]); } diff --git a/src/Grid/Displayers/DropdownActions.php b/src/Grid/Displayers/DropdownActions.php index 94cec8692a8a5668a67c3637abe234654d7ae3f1..59acc5dff8846c01fb1ea10b3d2f10415006a4e7 100644 --- a/src/Grid/Displayers/DropdownActions.php +++ b/src/Grid/Displayers/DropdownActions.php @@ -71,8 +71,8 @@ class DropdownActions extends Actions $this->prependDefaultActions(); $actions = [ - 'default' => $this->default, - 'custom' => $this->appends, + 'default' => $this->default, + 'custom' => $this->appends, 'selector' => ".{$this->grid->getRowName()}-checkbox", ]; diff --git a/src/Grid/Displayers/Editable.php b/src/Grid/Displayers/Editable.php index 50dec58a8423e3a9767fb70f205e7a7aa6321af4..b1f7e5c21dde88cf053274d546026e8e2aa11315 100644 --- a/src/Grid/Displayers/Editable.php +++ b/src/Grid/Displayers/Editable.php @@ -32,13 +32,13 @@ abstract class Editable extends AbstractDisplayer public function variables() { return [ - 'key' => $this->getKey(), - 'class' => $this->getSelector(), - 'name' => $this->getName(), - 'type' => $this->type, + 'key' => $this->getKey(), + 'class' => $this->getSelector(), + 'name' => $this->getName(), + 'type' => $this->type, 'display' => $this->getValue(), - 'value' => $this->getOriginal(), - 'url' => $this->getUrl(), + 'value' => $this->getOriginal(), + 'url' => $this->getUrl(), ]; } diff --git a/src/Grid/Displayers/Expand.php b/src/Grid/Displayers/Expand.php index 73accd78117ad35b757b64668981a1486ac2251a..aa9986fac679c0de884e828c35524a4fc824f3a5 100755 --- a/src/Grid/Displayers/Expand.php +++ b/src/Grid/Displayers/Expand.php @@ -50,10 +50,10 @@ class Expand extends AbstractDisplayer $button = is_null($this->button) ? $this->value : $this->button; return Admin::view('admin::grid.displayer.expand', [ - 'key' => $this->getKey(), - 'url' => $remoteUrl, - 'button' => $button, - 'html' => $html, + 'key' => $this->getKey(), + 'url' => $remoteUrl, + 'button' => $button, + 'html' => $html, 'dataKey' => $this->getDataKey(), ]); } diff --git a/src/Grid/Displayers/Select.php b/src/Grid/Displayers/Select.php index 5f369280bb6d053d4c9415b4d378ca116d593a49..445a58c2b23ac86114dcdb6442739aba0e34fb9a 100755 --- a/src/Grid/Displayers/Select.php +++ b/src/Grid/Displayers/Select.php @@ -13,9 +13,9 @@ class Select extends AbstractDisplayer } return Admin::view('admin::grid.displayer.select', [ - 'column' => $this->column->getName(), - 'value' => $this->value, - 'url' => $this->url(), + 'column' => $this->column->getName(), + 'value' => $this->value, + 'url' => $this->url(), 'options' => $options, 'refresh' => $refresh, ]); diff --git a/src/Grid/Displayers/SwitchGroup.php b/src/Grid/Displayers/SwitchGroup.php index f1adbf23c2864c6fbde8c1e5db6bd5fb4536d045..f61b6c0228bd9b8ea58ce9e950d272120bb7f65f 100755 --- a/src/Grid/Displayers/SwitchGroup.php +++ b/src/Grid/Displayers/SwitchGroup.php @@ -25,12 +25,12 @@ class SwitchGroup extends SwitchDisplay $color = $this->color ?: Admin::color()->primary(); return Admin::view('admin::grid.displayer.switchgroup', [ - 'row' => $this->row->toArray(), - 'key' => $this->getKey(), - 'columns' => $columns, + 'row' => $this->row->toArray(), + 'key' => $this->getKey(), + 'columns' => $columns, 'resource' => $this->resource(), - 'color' => $color, - 'refresh' => $refresh, + 'color' => $color, + 'refresh' => $refresh, ]); } } diff --git a/src/Grid/Displayers/Table.php b/src/Grid/Displayers/Table.php index 1fe407eca328802a747fa1b58b7ff38fc1d0bf4d..d6b0bae4a5beb5404975dbd281a96f13e0c32d4b 100755 --- a/src/Grid/Displayers/Table.php +++ b/src/Grid/Displayers/Table.php @@ -39,7 +39,7 @@ class Table extends AbstractDisplayer $variables = [ 'titles' => $titles, - 'data' => $data, + 'data' => $data, ]; return view('admin::grid.displayer.table', $variables)->render(); diff --git a/src/Grid/Exporter.php b/src/Grid/Exporter.php index a16a371e34cc659336d57caaaa89ae71600a13ac..c1f54a861fffe5c7a3f86d579b3f4ea4adb21bd5 100755 --- a/src/Grid/Exporter.php +++ b/src/Grid/Exporter.php @@ -47,10 +47,10 @@ class Exporter * @var array */ protected $options = [ - 'show_export_all' => true, - 'show_export_current_page' => true, + 'show_export_all' => true, + 'show_export_current_page' => true, 'show_export_selected_rows' => true, - 'chunk_size' => 5000, + 'chunk_size' => 5000, ]; /** @@ -136,8 +136,8 @@ class Exporter /** * Extends new exporter driver. * - * @param $driver - * @param $extend + * @param $driver + * @param $extend */ public static function extend($driver, $extend) { @@ -233,8 +233,8 @@ class Exporter } /** - * @param $method - * @param $arguments + * @param $method + * @param $arguments * @return mixed */ public function __call($method, $arguments) diff --git a/src/Grid/Exporters/AbstractExporter.php b/src/Grid/Exporters/AbstractExporter.php index c33f6a50473ad525ccbf22ccf175a686f885f1fd..e08343a16f4a5cba85f715bf563dbc62286ebd27 100755 --- a/src/Grid/Exporters/AbstractExporter.php +++ b/src/Grid/Exporters/AbstractExporter.php @@ -304,8 +304,8 @@ abstract class AbstractExporter implements ExporterInterface abstract public function export(); /** - * @param $method - * @param $arguments + * @param $method + * @param $arguments * @return mixed */ public function __call($method, $arguments) diff --git a/src/Grid/Filter.php b/src/Grid/Filter.php index a56fb31050efc9d4f55fb90c69c40d9db3e228c1..fb330454cb9f17fceb5476fca07ee75fb7c48943 100755 --- a/src/Grid/Filter.php +++ b/src/Grid/Filter.php @@ -87,29 +87,29 @@ class Filter implements Renderable * @var array */ protected static $defaultFilters = [ - 'equal' => Equal::class, - 'notEqual' => NotEqual::class, - 'ilike' => Ilike::class, - 'like' => Like::class, - 'startWith' => StartWith::class, - 'endWith' => EndWith::class, - 'gt' => Gt::class, - 'lt' => Lt::class, - 'ngt' => Ngt::class, - 'nlt' => Nlt::class, - 'between' => Between::class, - 'group' => Group::class, - 'where' => Where::class, + 'equal' => Equal::class, + 'notEqual' => NotEqual::class, + 'ilike' => Ilike::class, + 'like' => Like::class, + 'startWith' => StartWith::class, + 'endWith' => EndWith::class, + 'gt' => Gt::class, + 'lt' => Lt::class, + 'ngt' => Ngt::class, + 'nlt' => Nlt::class, + 'between' => Between::class, + 'group' => Group::class, + 'where' => Where::class, 'whereBetween' => WhereBetween::class, - 'in' => In::class, - 'notIn' => NotIn::class, - 'date' => Date::class, - 'day' => Day::class, - 'month' => Month::class, - 'year' => Year::class, - 'hidden' => Hidden::class, - 'newline' => Newline::class, - 'findInSet' => FindInSet::class, + 'in' => In::class, + 'notIn' => NotIn::class, + 'date' => Date::class, + 'day' => Day::class, + 'month' => Month::class, + 'year' => Year::class, + 'hidden' => Hidden::class, + 'newline' => Newline::class, + 'findInSet' => FindInSet::class, ]; /** @@ -719,13 +719,13 @@ class Filter implements Renderable protected function defaultVariables() { return [ - 'action' => $this->action ?: $this->urlWithoutFilters(), - 'layout' => $this->layout, - 'filterID' => $this->disableCollapse ? '' : $this->filterID, - 'expand' => $this->expand, - 'style' => $this->style, - 'border' => $this->border, - 'containerClass' => $this->containerClass, + 'action' => $this->action ?: $this->urlWithoutFilters(), + 'layout' => $this->layout, + 'filterID' => $this->disableCollapse ? '' : $this->filterID, + 'expand' => $this->expand, + 'style' => $this->style, + 'border' => $this->border, + 'containerClass' => $this->containerClass, 'disableResetButton' => $this->disableResetButton, ]; } diff --git a/src/Grid/Filter/AbstractFilter.php b/src/Grid/Filter/AbstractFilter.php index 878d7f7cf19ce1eed4b3376494e495bea0dc53e5..481bd1664e0780a7e97d3d6df22af7776d6c3b6d 100755 --- a/src/Grid/Filter/AbstractFilter.php +++ b/src/Grid/Filter/AbstractFilter.php @@ -113,7 +113,7 @@ abstract class AbstractFilter /** * AbstractFilter constructor. * - * @param $column + * @param $column * @param string $label */ public function __construct($column, $label = '') @@ -600,8 +600,8 @@ abstract class AbstractFilter protected function defaultVariables() { return array_merge([ - 'id' => $this->id, - 'name' => $this->formatName($this->column), + 'id' => $this->id, + 'name' => $this->formatName($this->column), 'label' => $this->label, 'value' => $this->normalizeValue(), 'width' => $this->width, @@ -655,8 +655,8 @@ abstract class AbstractFilter } /** - * @param $method - * @param $params + * @param $method + * @param $params * @return mixed * * @throws \Exception diff --git a/src/Grid/Filter/Group.php b/src/Grid/Filter/Group.php index d982759fa76211fbdf5d10f6d4033481e1b0e082..0315533f9d22c25dba6d324b78c4d69fe161bfda 100755 --- a/src/Grid/Filter/Group.php +++ b/src/Grid/Filter/Group.php @@ -293,7 +293,7 @@ JS; return array_merge(parent::defaultVariables(), [ 'group_name' => $this->name, - 'default' => $default, + 'default' => $default, ]); } diff --git a/src/Grid/Filter/Presenter/DateTime.php b/src/Grid/Filter/Presenter/DateTime.php index dc46694e24d87cba56bfd46a85f3fa0ce3ef81d7..7f069749e54fe6b6e422c764346e741db941ca0e 100755 --- a/src/Grid/Filter/Presenter/DateTime.php +++ b/src/Grid/Filter/Presenter/DateTime.php @@ -41,7 +41,7 @@ class DateTime extends Presenter public function defaultVariables(): array { return [ - 'group' => $this->filter->group, + 'group' => $this->filter->group, 'options' => $this->options, ]; } diff --git a/src/Grid/Filter/Presenter/Presenter.php b/src/Grid/Filter/Presenter/Presenter.php index 0c73007051a0b69b046421a6fd469fffd96a93b0..fea49904027e60f448d2c9d6df3c221ffb6d0a06 100755 --- a/src/Grid/Filter/Presenter/Presenter.php +++ b/src/Grid/Filter/Presenter/Presenter.php @@ -83,7 +83,7 @@ abstract class Presenter /** * Set default value for filter. * - * @param $default + * @param $default * @return $this */ public function default($default) diff --git a/src/Grid/Filter/Presenter/Radio.php b/src/Grid/Filter/Presenter/Radio.php index fa4856d0b20318f29827d25097480956302291c9..5204e6dcf930b077af94ff020527498706151189 100755 --- a/src/Grid/Filter/Presenter/Radio.php +++ b/src/Grid/Filter/Presenter/Radio.php @@ -70,8 +70,8 @@ class Radio extends Presenter $this->prepare(); return [ - 'options' => $this->options, - 'inline' => $this->inline, + 'options' => $this->options, + 'inline' => $this->inline, 'showLabel' => $this->showLabel, ]; } diff --git a/src/Grid/Filter/Presenter/Select.php b/src/Grid/Filter/Presenter/Select.php index d853e98c7aaa5d684ffe964d25e46eab97a23f77..6e3513a5ff92861bc2ee8e36951c461d4c9880a6 100755 --- a/src/Grid/Filter/Presenter/Select.php +++ b/src/Grid/Filter/Presenter/Select.php @@ -102,9 +102,9 @@ class Select extends Presenter } $this->addDefaultConfig([ - 'allowClear' => true, + 'allowClear' => true, 'placeholder' => [ - 'id' => '', + 'id' => '', 'text' => $this->placeholder(), ], ]); @@ -165,9 +165,9 @@ class Select extends Presenter 'url' => Helper::urlWithQuery(admin_url($url), $parameters), ]; $this->config([ - 'allowClear' => true, + 'allowClear' => true, 'placeholder' => [ - 'id' => '', + 'id' => '', 'text' => $this->placeholder(), ], ]); @@ -224,15 +224,15 @@ class Select extends Presenter * Load options from ajax. * * @param string $resourceUrl - * @param $idField - * @param $textField + * @param $idField + * @param $textField * @return $this */ public function ajax(string $resourceUrl, string $idField = 'id', string $textField = 'text') { $this->config([ - 'allowClear' => true, - 'placeholder' => $this->placeholder(), + 'allowClear' => true, + 'placeholder' => $this->placeholder(), 'minimumInputLength' => 1, ]); @@ -247,11 +247,11 @@ class Select extends Presenter public function defaultVariables(): array { return [ - 'options' => $this->buildOptions(), - 'class' => $this->getElementClass(), - 'selector' => $this->getElementClassSelector(), + 'options' => $this->buildOptions(), + 'class' => $this->getElementClass(), + 'selector' => $this->getElementClassSelector(), 'selectAll' => $this->selectAll, - 'configs' => $this->config, + 'configs' => $this->config, ]; } @@ -302,11 +302,11 @@ class Select extends Presenter }, (array) $sourceUrls)); return $this->addVariables(['loads' => [ - 'fields' => $fieldsStr, - 'urls' => $urlsStr, - 'idField' => $idField, + 'fields' => $fieldsStr, + 'urls' => $urlsStr, + 'idField' => $idField, 'textField' => $textField, - 'group' => 'form', + 'group' => 'form', ]]); } diff --git a/src/Grid/Filter/Presenter/SelectTable.php b/src/Grid/Filter/Presenter/SelectTable.php index f5fb47688d09be0bac0b6197bcbd1b798893970c..27a4313f1663e8385ef2a3597e7f53f82491bf7f 100644 --- a/src/Grid/Filter/Presenter/SelectTable.php +++ b/src/Grid/Filter/Presenter/SelectTable.php @@ -72,8 +72,8 @@ class SelectTable extends Presenter /** * 设置选中的key以及标题字段. * - * @param $visibleColumn - * @param $key + * @param $visibleColumn + * @param $key * @return $this */ public function pluck(?string $visibleColumn, ?string $key = 'id') @@ -198,8 +198,8 @@ JS $this->addScript(); return [ - 'id' => $this->id, - 'dialog' => $dialog, + 'id' => $this->id, + 'dialog' => $dialog, 'placeholder' => $this->placeholder(), ]; } diff --git a/src/Grid/Filter/Presenter/Text.php b/src/Grid/Filter/Presenter/Text.php index 3eece5352fc0dcd6fc75bcb92a4e099e60356377..5693ed259367319c6ca0d360954030e56108ec7c 100755 --- a/src/Grid/Filter/Presenter/Text.php +++ b/src/Grid/Filter/Presenter/Text.php @@ -40,9 +40,9 @@ class Text extends Presenter { return [ 'placeholder' => $this->placeholder, - 'icon' => $this->icon, - 'type' => $this->type, - 'group' => $this->filter->group, + 'icon' => $this->icon, + 'type' => $this->type, + 'group' => $this->filter->group, ]; } @@ -105,8 +105,8 @@ class Text extends Presenter public function currency($options = []) { return $this->inputmask(array_merge($options, [ - 'alias' => 'currency', - 'prefix' => '', + 'alias' => 'currency', + 'prefix' => '', 'removeMaskOnSubmit' => true, ])); } diff --git a/src/Grid/Model.php b/src/Grid/Model.php index 1586078cf235756d16d867242c8752ea36e66c7d..37ad95f0071fbe71352b40e1feedf89ed150ea50 100755 --- a/src/Grid/Model.php +++ b/src/Grid/Model.php @@ -546,7 +546,7 @@ class Model /** * Find query by method name. * - * @param $method + * @param $method * @return Collection */ public function findQueryByMethod($method) @@ -639,7 +639,7 @@ class Model public function addQuery(string $method, array $arguments = []) { $this->queries->push([ - 'method' => $method, + 'method' => $method, 'arguments' => $arguments, ]); diff --git a/src/Grid/Tools/BatchActions.php b/src/Grid/Tools/BatchActions.php index f1ed0fd2653114f605019026fafb0b6b078def61..bf3a83fe821f68a6e5159f4abc84ed6a875eed4e 100755 --- a/src/Grid/Tools/BatchActions.php +++ b/src/Grid/Tools/BatchActions.php @@ -123,10 +123,10 @@ class BatchActions extends AbstractTool protected function defaultVariables() { return [ - 'actions' => $this->actions, - 'selectAllName' => $this->parent->getSelectAllName(), + 'actions' => $this->actions, + 'selectAllName' => $this->parent->getSelectAllName(), 'isHoldSelectAllCheckbox' => $this->isHoldSelectAllCheckbox, - 'parent' => $this->parent, + 'parent' => $this->parent, ]; } diff --git a/src/Grid/Tools/ColumnSelector.php b/src/Grid/Tools/ColumnSelector.php index 18f39cbc2021e8b1e7b3364815dd393a74b8e53c..3006db2f79223408ea35bb06fd00c9a53857a58a 100644 --- a/src/Grid/Tools/ColumnSelector.php +++ b/src/Grid/Tools/ColumnSelector.php @@ -56,9 +56,9 @@ class ColumnSelector extends AbstractTool ); return Admin::view('admin::grid.column-selector', [ - 'checkbox' => $list, - 'defaults' => $visibleColumnNames, - 'selectAll' => $selectAll, + 'checkbox' => $list, + 'defaults' => $visibleColumnNames, + 'selectAll' => $selectAll, 'columnName' => $this->grid->getColumnSelectorQueryName(), ]); } diff --git a/src/Grid/Tools/FilterButton.php b/src/Grid/Tools/FilterButton.php index f4e1a8572d155eeb4046039dd4a0790293220d5f..d9c15eb95ec38bfa47dbe92cc21a9ce465451818 100755 --- a/src/Grid/Tools/FilterButton.php +++ b/src/Grid/Tools/FilterButton.php @@ -152,14 +152,14 @@ JS; $onlyScopes = ((! $filters || $this->parent->option('filter') === false) && ! $scopres->isEmpty()) ? true : false; $variables = [ - 'scopes' => $scopres, + 'scopes' => $scopres, 'current_label' => $this->currentScopeLabel(), 'url_no_scopes' => $filter->urlWithoutScopes(), - 'btn_class' => $this->getElementClassName(), - 'expand' => $filter->expand, - 'filter_text' => true, - 'only_scopes' => $onlyScopes, - 'valueCount' => $valueCount, + 'btn_class' => $this->getElementClassName(), + 'expand' => $filter->expand, + 'filter_text' => true, + 'only_scopes' => $onlyScopes, + 'valueCount' => $valueCount, ]; return view($this->view, $variables)->render(); diff --git a/src/Grid/Tools/Paginator.php b/src/Grid/Tools/Paginator.php index caeb77b5f6f222164825a272a3da57a81227d48f..216e154c120482a2db76a69a7a01e5e525eb7f5b 100755 --- a/src/Grid/Tools/Paginator.php +++ b/src/Grid/Tools/Paginator.php @@ -78,7 +78,7 @@ class Paginator implements Renderable { $parameters = [ 'first' => $this->paginator->firstItem(), - 'last' => $this->paginator->lastItem(), + 'last' => $this->paginator->lastItem(), 'total' => method_exists($this->paginator, 'total') ? $this->paginator->total() : '...', ]; diff --git a/src/Grid/Tools/QuickCreate.php b/src/Grid/Tools/QuickCreate.php index 240896f5359921ac167ea5699973643c2a8ca91a..2a0b2bd0ac16a5fc3311b5eb1b55a4ffd2598ee8 100644 --- a/src/Grid/Tools/QuickCreate.php +++ b/src/Grid/Tools/QuickCreate.php @@ -293,12 +293,12 @@ class QuickCreate implements Renderable } $vars = [ - 'columnCount' => $columnCount, - 'fields' => $this->fields, + 'columnCount' => $columnCount, + 'fields' => $this->fields, 'elementClass' => $this->getElementClass(), - 'url' => $this->action, - 'method' => $this->method, - 'uniqueName' => $this->parent->getName(), + 'url' => $this->action, + 'method' => $this->method, + 'uniqueName' => $this->parent->getName(), ]; return Admin::view('admin::grid.quick-create.form', $vars); diff --git a/src/Grid/Tools/QuickSearch.php b/src/Grid/Tools/QuickSearch.php index 3e3335a5ce8accd2e6b4213c3e712dc76356715b..ca6a67e35718888bef6e8ff79247455268dff4d2 100755 --- a/src/Grid/Tools/QuickSearch.php +++ b/src/Grid/Tools/QuickSearch.php @@ -106,12 +106,12 @@ class QuickSearch extends AbstractTool $this->setupScript(); $data = [ - 'action' => $this->formAction(), - 'key' => $this->getQueryName(), - 'value' => $this->value(), + 'action' => $this->formAction(), + 'key' => $this->getQueryName(), + 'value' => $this->value(), 'placeholder' => $this->placeholder ?: trans('admin.search'), - 'width' => $this->width, - 'auto' => $this->autoSubmit, + 'width' => $this->width, + 'auto' => $this->autoSubmit, ]; return view($this->view, $data); diff --git a/src/Grid/Tools/Selector.php b/src/Grid/Tools/Selector.php index c5d2411c0297f798751268bcc80e0dd479b00227..db2fcf31e95f5d1ab472835ba35545df39648777 100644 --- a/src/Grid/Tools/Selector.php +++ b/src/Grid/Tools/Selector.php @@ -205,7 +205,7 @@ class Selector public function render() { return view('admin::grid.selector', [ - 'self' => $this, + 'self' => $this, 'selected' => $this->parseSelected(), ]); } diff --git a/src/Http/Controllers/AuthController.php b/src/Http/Controllers/AuthController.php index dd47ef21697aed1315df44b606ca2baa5361335d..63cc9c6b0e8dde91f5c1d4230fcaead6da641090 100644 --- a/src/Http/Controllers/AuthController.php +++ b/src/Http/Controllers/AuthController.php @@ -55,8 +55,8 @@ class AuthController extends Controller /** @var \Illuminate\Validation\Validator $validator */ $validator = Validator::make($credentials, [ - $this->username() => 'required', - 'password' => 'required', + $this->username() => 'required', + 'password' => 'required', ]); if ($validator->fails()) { diff --git a/src/Http/Controllers/ExtensionController.php b/src/Http/Controllers/ExtensionController.php index 9b57e2f2bf1049c9f67febea4c7e908715825093..ffceb2c47a5605de7274824b8bf2969103288577 100644 --- a/src/Http/Controllers/ExtensionController.php +++ b/src/Http/Controllers/ExtensionController.php @@ -131,9 +131,9 @@ class ExtensionController extends Controller $output = new StringOutput(); Artisan::call('admin:ext-make', [ - 'name' => $package, + 'name' => $package, '--namespace' => $namespace ?: 'default', - '--theme' => $type == 2, + '--theme' => $type == 2, ], $output); return sprintf('
%s
', (string) $output->getContent()); diff --git a/src/Http/Controllers/HandleFormController.php b/src/Http/Controllers/HandleFormController.php index 98d6f0a869189710e7397ff3d60d6b3de90a72db..76551767095553ae6e49d845e035d76e58620c08 100644 --- a/src/Http/Controllers/HandleFormController.php +++ b/src/Http/Controllers/HandleFormController.php @@ -45,7 +45,7 @@ class HandleFormController /** * @param Request $request - * @param $form + * @param $form * @return File */ protected function getField(Request $request, $form) diff --git a/src/Http/Controllers/IconController.php b/src/Http/Controllers/IconController.php index 1432d2e76a8235d7bcda429b6c89a9afc8daec2a..a7084c752bc51fe2ca91adbada21a60e49259283 100644 --- a/src/Http/Controllers/IconController.php +++ b/src/Http/Controllers/IconController.php @@ -29,8 +29,8 @@ class IconController extends Controller $tab = Tab::make() ->withCard() ->padding('20px') - ->add(('Feather'), view('admin::helpers.feather')) - ->add(('Font Awesome'), view('admin::helpers.font-awesome')); + ->add('Feather', view('admin::helpers.feather')) + ->add('Font Awesome', view('admin::helpers.font-awesome')); $row->column(12, $tab); }); diff --git a/src/Http/Controllers/ScaffoldController.php b/src/Http/Controllers/ScaffoldController.php index 312affa310e1d11ac4768817246953e0070b38b6..b7c3b05aef3212b044fddc9123d4e32836629c21 100644 --- a/src/Http/Controllers/ScaffoldController.php +++ b/src/Http/Controllers/ScaffoldController.php @@ -31,35 +31,35 @@ class ScaffoldController extends Controller ]; public static $dataTypeMap = [ - 'int' => 'integer', - 'int@unsigned' => 'unsignedInteger', - 'tinyint' => 'tinyInteger', - 'tinyint@unsigned' => 'unsignedTinyInteger', - 'smallint' => 'smallInteger', - 'smallint@unsigned' => 'unsignedSmallInteger', - 'mediumint' => 'mediumInteger', + 'int' => 'integer', + 'int@unsigned' => 'unsignedInteger', + 'tinyint' => 'tinyInteger', + 'tinyint@unsigned' => 'unsignedTinyInteger', + 'smallint' => 'smallInteger', + 'smallint@unsigned' => 'unsignedSmallInteger', + 'mediumint' => 'mediumInteger', 'mediumint@unsigned' => 'unsignedMediumInteger', - 'bigint' => 'bigInteger', - 'bigint@unsigned' => 'unsignedBigInteger', + 'bigint' => 'bigInteger', + 'bigint@unsigned' => 'unsignedBigInteger', - 'date' => 'date', - 'time' => 'time', - 'datetime' => 'dateTime', + 'date' => 'date', + 'time' => 'time', + 'datetime' => 'dateTime', 'timestamp' => 'timestamp', - 'enum' => 'enum', - 'json' => 'json', + 'enum' => 'enum', + 'json' => 'json', 'binary' => 'binary', - 'float' => 'float', - 'double' => 'double', + 'float' => 'float', + 'double' => 'double', 'decimal' => 'decimal', - 'varchar' => 'string', - 'char' => 'char', - 'text' => 'text', + 'varchar' => 'string', + 'char' => 'char', + 'text' => 'text', 'mediumtext' => 'mediumText', - 'longtext' => 'longText', + 'longtext' => 'longText', ]; public function index(Content $content) @@ -98,7 +98,7 @@ class ScaffoldController extends Controller { return [ 'status' => 1, - 'value' => Str::singular($tableName), + 'value' => Str::singular($tableName), ]; } @@ -257,12 +257,12 @@ class ScaffoldController extends Controller } return [ - 'type' => $v['DATA_TYPE'], - 'default' => $v['COLUMN_DEFAULT'], + 'type' => $v['DATA_TYPE'], + 'default' => $v['COLUMN_DEFAULT'], 'nullable' => $v['IS_NULLABLE'], - 'key' => $v['COLUMN_KEY'], - 'id' => $v['COLUMN_KEY'] === 'PRI', - 'comment' => $v['COLUMN_COMMENT'], + 'key' => $v['COLUMN_KEY'], + 'id' => $v['COLUMN_KEY'] === 'PRI', + 'comment' => $v['COLUMN_COMMENT'], ]; })->toArray(); })->toArray(); @@ -276,7 +276,7 @@ class ScaffoldController extends Controller protected function backWithException(\Exception $exception) { $error = new MessageBag([ - 'title' => 'Error', + 'title' => 'Error', 'message' => $exception->getMessage(), ]); @@ -294,7 +294,7 @@ class ScaffoldController extends Controller $messages[] = "
$message"; $success = new MessageBag([ - 'title' => 'Success', + 'title' => 'Success', 'message' => implode('
', $messages), ]); diff --git a/src/Http/Displayers/Extensions/Description.php b/src/Http/Displayers/Extensions/Description.php index b708b34d6fb1c3d9a3bd12680b9294b6d599c8cc..9c4e7227b8e3bc74d71cca129c825a7691257bbc 100644 --- a/src/Http/Displayers/Extensions/Description.php +++ b/src/Http/Displayers/Extensions/Description.php @@ -13,7 +13,7 @@ class Description extends AbstractDisplayer { return Admin::view('admin::grid.displayer.extensions.description', [ 'value' => $this->value, - 'row' => $this->row, + 'row' => $this->row, 'settingAction' => $this->resolveSettingForm(), 'updateAction' => $this->resolveAction(Update::class), ]); diff --git a/src/Http/Displayers/Extensions/Name.php b/src/Http/Displayers/Extensions/Name.php index b4ddf6cd00c392f465afc91a17b37c95a9deca26..09d12226b33db11510c6aa7271ce78cda082f610 100644 --- a/src/Http/Displayers/Extensions/Name.php +++ b/src/Http/Displayers/Extensions/Name.php @@ -13,12 +13,12 @@ class Name extends AbstractDisplayer public function display() { return Admin::view('admin::grid.displayer.extensions.name', [ - 'value' => $this->value, - 'row' => $this->row, - 'enableAction' => $this->resolveAction(Enable::class), - 'disableAction' => $this->resolveAction(Disable::class), + 'value' => $this->value, + 'row' => $this->row, + 'enableAction' => $this->resolveAction(Enable::class), + 'disableAction' => $this->resolveAction(Disable::class), 'uninstallAction' => $this->resolveAction(Uninstall::class), - 'linkIcon' => 'icon-link', + 'linkIcon' => 'icon-link', ]); } diff --git a/src/Http/JsonResponse.php b/src/Http/JsonResponse.php index 05a4e0769b3e9dfa42a0ba61b84f776eab5c4d2b..bbd4cc3e9671b1cc5e45cf5cb4c4787efb43e7e9 100644 --- a/src/Http/JsonResponse.php +++ b/src/Http/JsonResponse.php @@ -132,7 +132,7 @@ class JsonResponse implements Arrayable /** * 设置 toastr 显示时长. * - * @param $seconds + * @param $seconds * @return $this */ public function timeout($seconds) @@ -307,7 +307,7 @@ class JsonResponse implements Arrayable /** * 设置字段验证错误信息. * - * @param $errors + * @param $errors * @return $this */ public function withValidation($errors) diff --git a/src/Http/Middleware/Pjax.php b/src/Http/Middleware/Pjax.php index c6d89df6c4c570664e15092c59ce1d09b7f24ff7..4dcc35126dc2fddc5e0deb49dbcf55d18043595e 100644 --- a/src/Http/Middleware/Pjax.php +++ b/src/Http/Middleware/Pjax.php @@ -52,10 +52,10 @@ class Pjax $exception = $response->exception; $error = new MessageBag([ - 'type' => get_class($exception), + 'type' => get_class($exception), 'message' => $exception->getMessage(), - 'file' => $exception->getFile(), - 'line' => $exception->getLine(), + 'file' => $exception->getFile(), + 'line' => $exception->getLine(), ]); return back()->withInput()->withErrors($error, 'exception'); diff --git a/src/Http/Repositories/Extension.php b/src/Http/Repositories/Extension.php index 8a323f2650e1ae3e257c49ca98151241e9cd6b7b..d65f5c0b58548ec2c87e377359201279535b4918 100644 --- a/src/Http/Repositories/Extension.php +++ b/src/Http/Repositories/Extension.php @@ -34,18 +34,18 @@ class Extension extends Repository $latest = $extension->getLocalLatestVersion(); return [ - 'id' => $name, - 'alias' => $extension->getAlias(), - 'logo' => $extension->getLogoBase64(), - 'name' => $name, - 'version' => $current, - 'type' => $extension->getType(), - 'description' => $property->description, - 'authors' => $property->authors, - 'homepage' => $property->homepage, - 'enabled' => $extension->enabled(), - 'new_version' => $latest === $current || ! $current ? '' : $latest, - 'extension' => $extension, + 'id' => $name, + 'alias' => $extension->getAlias(), + 'logo' => $extension->getLogoBase64(), + 'name' => $name, + 'version' => $current, + 'type' => $extension->getType(), + 'description' => $property->description, + 'authors' => $property->authors, + 'homepage' => $property->homepage, + 'enabled' => $extension->enabled(), + 'new_version' => $latest === $current || ! $current ? '' : $latest, + 'extension' => $extension, ]; } diff --git a/src/Layout/Asset.php b/src/Layout/Asset.php index 651f3fcf78215279b9292eee575e7ef60857d8c7..711b7da411f0bd5ae5a0e078ab51b9d86d2dcb05 100644 --- a/src/Layout/Asset.php +++ b/src/Layout/Asset.php @@ -32,11 +32,11 @@ class Asset 'css' => '@admin/dcat/css/nunito.css', ], '@dcat' => [ - 'js' => '@admin/dcat/js/dcat-app.js', + 'js' => '@admin/dcat/js/dcat-app.js', 'css' => '@admin/dcat/css/dcat-app.css', ], '@vendors' => [ - 'js' => '@admin/dcat/plugins/vendors.min.js', + 'js' => '@admin/dcat/plugins/vendors.min.js', 'css' => '@admin/dcat/plugins/vendors.min.css', ], '@jquery.initialize' => [ @@ -64,25 +64,25 @@ class Asset 'js' => '@admin/dcat/plugins/jquery-pjax/jquery.pjax.min.js', ], '@toastr' => [ - 'js' => '@admin/dcat/plugins/extensions/toastr.min.js', + 'js' => '@admin/dcat/plugins/extensions/toastr.min.js', 'css' => '@admin/dcat/plugins/extensions/toastr.css', ], '@jquery.nestable' => [ - 'js' => '@admin/dcat/plugins/nestable/jquery.nestable.min.js', + 'js' => '@admin/dcat/plugins/nestable/jquery.nestable.min.js', 'css' => '@admin/dcat/plugins/nestable/nestable.css', ], '@validator' => [ 'js' => '@admin/dcat/plugins/bootstrap-validator/validator.min.js', ], '@select2' => [ - 'js' => [ + 'js' => [ '@admin/dcat/plugins/select/select2.full.min.js', '@admin/dcat/plugins/select/i18n/{lang}.js', ], 'css' => '@admin/dcat/plugins/select/select2.min.css', ], '@bootstrap-datetimepicker' => [ - 'js' => '@admin/dcat/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js', + 'js' => '@admin/dcat/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js', 'css' => '@admin/dcat/plugins/bootstrap-datetimepicker/bootstrap-datetimepicker.min.css', ], '@moment' => [ @@ -96,11 +96,11 @@ class Asset ], ], '@jstree' => [ - 'js' => '@admin/dcat/plugins/jstree-theme/jstree.min.js', + 'js' => '@admin/dcat/plugins/jstree-theme/jstree.min.js', 'css' => '@admin/dcat/plugins/jstree-theme/themes/proton/style.min.css', ], '@switchery' => [ - 'js' => '@admin/dcat/plugins/switchery/switchery.min.js', + 'js' => '@admin/dcat/plugins/switchery/switchery.min.js', 'css' => '@admin/dcat/plugins/switchery/switchery.min.css', ], '@webuploader' => [ @@ -117,7 +117,7 @@ class Asset 'js' => '@admin/dcat/plugins/jquery.sparkline/jquery.sparkline.min.js', ], '@jquery.bootstrap-duallistbox' => [ - 'js' => '@admin/dcat/plugins/bootstrap-duallistbox/dist/jquery.bootstrap-duallistbox.min.js', + 'js' => '@admin/dcat/plugins/bootstrap-duallistbox/dist/jquery.bootstrap-duallistbox.min.js', 'css' => '@admin/dcat/plugins/bootstrap-duallistbox/dist/bootstrap-duallistbox.min.css', ], '@number-input' => [ @@ -222,7 +222,7 @@ class Asset */ public $headerJs = [ 'vendors' => '@vendors', - 'dcat' => '@dcat', + 'dcat' => '@dcat', ]; /** @@ -231,11 +231,11 @@ class Asset * @var array */ public $baseCss = [ - 'adminlte' => '@adminlte', - 'vendors' => '@vendors', - 'toastr' => '@toastr', - 'datatables' => '@datatables', - 'dcat' => '@dcat', + 'adminlte' => '@adminlte', + 'vendors' => '@vendors', + 'toastr' => '@toastr', + 'datatables' => '@datatables', + 'dcat' => '@dcat', ]; /** @@ -244,12 +244,12 @@ class Asset * @var array */ public $baseJs = [ - 'adminlte' => '@adminlte', - 'toastr' => '@toastr', - 'pjax' => '@pjax', + 'adminlte' => '@adminlte', + 'toastr' => '@toastr', + 'pjax' => '@pjax', 'validator' => '@validator', - 'layer' => '@layer', - 'init' => '@jquery.initialize', + 'layer' => '@layer', + 'init' => '@jquery.initialize', ]; /** @@ -542,7 +542,7 @@ class Asset /** * 判断别名是否存在. * - * @param $value + * @param $value * @return bool */ public function hasAlias($value) diff --git a/src/Layout/Column.php b/src/Layout/Column.php index 8630057d7e551f96f97d3cc3f13f702296185ce9..4eee82dd3382bad3612478ab68eb1650bbffe252 100755 --- a/src/Layout/Column.php +++ b/src/Layout/Column.php @@ -24,7 +24,7 @@ class Column implements Renderable /** * Column constructor. * - * @param $content + * @param $content * @param int $width */ public function __construct($content, $width = 12) @@ -58,7 +58,7 @@ class Column implements Renderable /** * Append content to column. * - * @param $content + * @param $content * @return $this */ public function append($content) @@ -71,7 +71,7 @@ class Column implements Renderable /** * Add a row for column. * - * @param $content + * @param $content * @return Column */ public function row($content) diff --git a/src/Layout/Content.php b/src/Layout/Content.php index 003e278652388d70e5f0d3421582d4cf46fe5856..f0d39e5178295f96bd5fb5761e40a8dc680976aa 100755 --- a/src/Layout/Content.php +++ b/src/Layout/Content.php @@ -188,7 +188,7 @@ class Content implements Renderable $breadcrumb = [ [ 'text' => $breadcrumb[0] ?? null, - 'url' => $breadcrumb[1] ?? null, + 'url' => $breadcrumb[1] ?? null, 'icon' => $breadcrumb[2] ?? null, ], ]; @@ -209,7 +209,7 @@ class Content implements Renderable /** * Add one row for content body. * - * @param $content + * @param $content * @return $this */ public function row($content) @@ -226,7 +226,7 @@ class Content implements Renderable } /** - * @param $content + * @param $content * @return $this */ public function prepend($content) @@ -411,10 +411,10 @@ class Content implements Renderable protected function variables() { return array_merge([ - 'header' => $this->title, - 'description' => $this->description, - 'breadcrumb' => $this->breadcrumb, - 'configData' => $this->applyClasses(), + 'header' => $this->title, + 'description' => $this->description, + 'breadcrumb' => $this->breadcrumb, + 'configData' => $this->applyClasses(), 'pjaxContainerId' => Admin::getPjaxContainerId(), ], $this->variables); } @@ -426,14 +426,14 @@ class Content implements Renderable { // default data array $defaultData = [ - 'theme' => '', + 'theme' => '', 'sidebar_collapsed' => false, - 'sidebar_style' => 'sidebar-light-primary', - 'navbar_color' => '', - 'navbar_class' => 'sticky', - 'footer_type' => '', - 'body_class' => [], - 'horizontal_menu' => false, + 'sidebar_style' => 'sidebar-light-primary', + 'navbar_color' => '', + 'navbar_class' => 'sticky', + 'footer_type' => '', + 'body_class' => [], + 'horizontal_menu' => false, ]; $data = array_merge( @@ -442,14 +442,14 @@ class Content implements Renderable ); $allOptions = [ - 'theme' => '', - 'footer_type' => '', - 'body_class' => [], - 'sidebar_style' => ['light' => 'sidebar-light-primary', 'primary' => 'sidebar-primary', 'dark' => 'sidebar-dark-white'], + 'theme' => '', + 'footer_type' => '', + 'body_class' => [], + 'sidebar_style' => ['light' => 'sidebar-light-primary', 'primary' => 'sidebar-primary', 'dark' => 'sidebar-dark-white'], 'sidebar_collapsed' => [], - 'navbar_color' => [], - 'navbar_class' => ['floating' => 'floating-nav', 'sticky' => 'fixed-top', 'hidden' => 'd-none'], - 'horizontal_menu' => [], + 'navbar_color' => [], + 'navbar_class' => ['floating' => 'floating-nav', 'sticky' => 'fixed-top', 'hidden' => 'd-none'], + 'horizontal_menu' => [], ]; $maps = [ @@ -492,14 +492,14 @@ class Content implements Renderable } return [ - 'theme' => $data['theme'], + 'theme' => $data['theme'], 'sidebar_collapsed' => $data['sidebar_collapsed'], - 'navbar_color' => $data['navbar_color'], - 'navbar_class' => $allOptions['navbar_class'][$data['navbar_class']], - 'sidebar_class' => $data['sidebar_collapsed'] ? 'sidebar-collapse' : '', - 'body_class' => implode(' ', $data['body_class']), - 'sidebar_style' => $data['sidebar_style'], - 'horizontal_menu' => $data['horizontal_menu'], + 'navbar_color' => $data['navbar_color'], + 'navbar_class' => $allOptions['navbar_class'][$data['navbar_class']], + 'sidebar_class' => $data['sidebar_collapsed'] ? 'sidebar-collapse' : '', + 'body_class' => implode(' ', $data['body_class']), + 'sidebar_style' => $data['sidebar_style'], + 'horizontal_menu' => $data['horizontal_menu'], ]; } diff --git a/src/Layout/Menu.php b/src/Layout/Menu.php index c0690668b375e2f3d95c4c9919eed98cf0ac0702..1f018164f523776664867d0a5d2dfaae5a2d22b7 100755 --- a/src/Layout/Menu.php +++ b/src/Layout/Menu.php @@ -10,31 +10,31 @@ class Menu { protected static $helperNodes = [ [ - 'id' => 1, - 'title' => 'Helpers', - 'icon' => 'fa fa-keyboard-o', - 'uri' => '', + 'id' => 1, + 'title' => 'Helpers', + 'icon' => 'fa fa-keyboard-o', + 'uri' => '', 'parent_id' => 0, ], [ - 'id' => 2, - 'title' => 'Extensions', - 'icon' => '', - 'uri' => 'auth/extensions', + 'id' => 2, + 'title' => 'Extensions', + 'icon' => '', + 'uri' => 'auth/extensions', 'parent_id' => 1, ], [ - 'id' => 3, - 'title' => 'Scaffold', - 'icon' => '', - 'uri' => 'helpers/scaffold', + 'id' => 3, + 'title' => 'Scaffold', + 'icon' => '', + 'uri' => 'helpers/scaffold', 'parent_id' => 1, ], [ - 'id' => 4, - 'title' => 'Icons', - 'icon' => '', - 'uri' => 'helpers/icons', + 'id' => 4, + 'title' => 'Icons', + 'icon' => '', + 'uri' => 'helpers/icons', 'parent_id' => 1, ], ]; @@ -175,7 +175,7 @@ class Menu /** * 判断扩展是否启用. * - * @param $item + * @param $item * @return bool */ protected function checkExtension($item) @@ -213,7 +213,7 @@ class Menu /** * 判断权限. * - * @param $item + * @param $item * @return bool */ protected function checkPermission($item) diff --git a/src/Layout/Navbar.php b/src/Layout/Navbar.php index 192493ec79df3720f8bd952bfbb22d4684551869..2890d7b2c27118154ebaff60f7a215811bbe9ab3 100755 --- a/src/Layout/Navbar.php +++ b/src/Layout/Navbar.php @@ -22,7 +22,7 @@ class Navbar implements Renderable public function __construct() { $this->elements = [ - 'left' => collect(), + 'left' => collect(), 'right' => collect(), ]; diff --git a/src/Layout/Row.php b/src/Layout/Row.php index fe4e7342f1b201ca8677191c01fcaaa8dbc6e6d8..a43199eac13f71727a1572f78f0d464bbfce8e3f 100755 --- a/src/Layout/Row.php +++ b/src/Layout/Row.php @@ -33,7 +33,7 @@ class Row implements Renderable * Add a column. * * @param int $width - * @param $content + * @param $content */ public function column($width, $content) { diff --git a/src/Layout/SectionManager.php b/src/Layout/SectionManager.php index 25167c50fcc01a089a620d16e6d0353eab7e406c..f5106ee233e79c86861c49e9f2edba2bfaba94df 100755 --- a/src/Layout/SectionManager.php +++ b/src/Layout/SectionManager.php @@ -77,7 +77,7 @@ class SectionManager $this->sections[$section][$priority][] = [ 'append' => $append, - 'value' => &$content, + 'value' => &$content, ]; } diff --git a/src/Models/AdminTablesSeeder.php b/src/Models/AdminTablesSeeder.php index 58c40f0265b895ed1e9e4b5337aca97ebfc06692..61ca71b8fa9df7222e207fd4ec4a52042dcca628 100755 --- a/src/Models/AdminTablesSeeder.php +++ b/src/Models/AdminTablesSeeder.php @@ -18,17 +18,17 @@ class AdminTablesSeeder extends Seeder // create a user. Administrator::truncate(); Administrator::create([ - 'username' => 'admin', - 'password' => bcrypt('admin'), - 'name' => 'Administrator', + 'username' => 'admin', + 'password' => bcrypt('admin'), + 'name' => 'Administrator', 'created_at' => $createdAt, ]); // create a role. Role::truncate(); Role::create([ - 'name' => 'Administrator', - 'slug' => Role::ADMINISTRATOR, + 'name' => 'Administrator', + 'slug' => Role::ADMINISTRATOR, 'created_at' => $createdAt, ]); @@ -39,64 +39,64 @@ class AdminTablesSeeder extends Seeder Permission::truncate(); Permission::insert([ [ - 'id' => 1, - 'name' => 'Auth management', - 'slug' => 'auth-management', + 'id' => 1, + 'name' => 'Auth management', + 'slug' => 'auth-management', 'http_method' => '', - 'http_path' => '', - 'parent_id' => 0, - 'order' => 1, - 'created_at' => $createdAt, + 'http_path' => '', + 'parent_id' => 0, + 'order' => 1, + 'created_at' => $createdAt, ], [ - 'id' => 2, - 'name' => 'Users', - 'slug' => 'users', + 'id' => 2, + 'name' => 'Users', + 'slug' => 'users', 'http_method' => '', - 'http_path' => '/auth/users*', - 'parent_id' => 1, - 'order' => 2, - 'created_at' => $createdAt, + 'http_path' => '/auth/users*', + 'parent_id' => 1, + 'order' => 2, + 'created_at' => $createdAt, ], [ - 'id' => 3, - 'name' => 'Roles', - 'slug' => 'roles', + 'id' => 3, + 'name' => 'Roles', + 'slug' => 'roles', 'http_method' => '', - 'http_path' => '/auth/roles*', - 'parent_id' => 1, - 'order' => 3, - 'created_at' => $createdAt, + 'http_path' => '/auth/roles*', + 'parent_id' => 1, + 'order' => 3, + 'created_at' => $createdAt, ], [ - 'id' => 4, - 'name' => 'Permissions', - 'slug' => 'permissions', + 'id' => 4, + 'name' => 'Permissions', + 'slug' => 'permissions', 'http_method' => '', - 'http_path' => '/auth/permissions*', - 'parent_id' => 1, - 'order' => 4, - 'created_at' => $createdAt, + 'http_path' => '/auth/permissions*', + 'parent_id' => 1, + 'order' => 4, + 'created_at' => $createdAt, ], [ - 'id' => 5, - 'name' => 'Menu', - 'slug' => 'menu', + 'id' => 5, + 'name' => 'Menu', + 'slug' => 'menu', 'http_method' => '', - 'http_path' => '/auth/menu*', - 'parent_id' => 1, - 'order' => 5, - 'created_at' => $createdAt, + 'http_path' => '/auth/menu*', + 'parent_id' => 1, + 'order' => 5, + 'created_at' => $createdAt, ], [ - 'id' => 6, - 'name' => 'Extension', - 'slug' => 'extension', + 'id' => 6, + 'name' => 'Extension', + 'slug' => 'extension', 'http_method' => '', - 'http_path' => '/auth/extensions*', - 'parent_id' => 1, - 'order' => 6, - 'created_at' => $createdAt, + 'http_path' => '/auth/extensions*', + 'parent_id' => 1, + 'order' => 6, + 'created_at' => $createdAt, ], ]); @@ -106,60 +106,60 @@ class AdminTablesSeeder extends Seeder Menu::truncate(); Menu::insert([ [ - 'parent_id' => 0, - 'order' => 1, - 'title' => 'Index', - 'icon' => 'feather icon-bar-chart-2', - 'uri' => '/', - 'created_at' => $createdAt, + 'parent_id' => 0, + 'order' => 1, + 'title' => 'Index', + 'icon' => 'feather icon-bar-chart-2', + 'uri' => '/', + 'created_at' => $createdAt, ], [ - 'parent_id' => 0, - 'order' => 2, - 'title' => 'Admin', - 'icon' => 'feather icon-settings', - 'uri' => '', - 'created_at' => $createdAt, + 'parent_id' => 0, + 'order' => 2, + 'title' => 'Admin', + 'icon' => 'feather icon-settings', + 'uri' => '', + 'created_at' => $createdAt, ], [ - 'parent_id' => 2, - 'order' => 3, - 'title' => 'Users', - 'icon' => '', - 'uri' => 'auth/users', - 'created_at' => $createdAt, + 'parent_id' => 2, + 'order' => 3, + 'title' => 'Users', + 'icon' => '', + 'uri' => 'auth/users', + 'created_at' => $createdAt, ], [ - 'parent_id' => 2, - 'order' => 4, - 'title' => 'Roles', - 'icon' => '', - 'uri' => 'auth/roles', - 'created_at' => $createdAt, + 'parent_id' => 2, + 'order' => 4, + 'title' => 'Roles', + 'icon' => '', + 'uri' => 'auth/roles', + 'created_at' => $createdAt, ], [ - 'parent_id' => 2, - 'order' => 5, - 'title' => 'Permission', - 'icon' => '', - 'uri' => 'auth/permissions', - 'created_at' => $createdAt, + 'parent_id' => 2, + 'order' => 5, + 'title' => 'Permission', + 'icon' => '', + 'uri' => 'auth/permissions', + 'created_at' => $createdAt, ], [ - 'parent_id' => 2, - 'order' => 6, - 'title' => 'Menu', - 'icon' => '', - 'uri' => 'auth/menu', - 'created_at' => $createdAt, + 'parent_id' => 2, + 'order' => 6, + 'title' => 'Menu', + 'icon' => '', + 'uri' => 'auth/menu', + 'created_at' => $createdAt, ], [ - 'parent_id' => 2, - 'order' => 7, - 'title' => 'Extensions', - 'icon' => '', - 'uri' => 'auth/extensions', - 'created_at' => $createdAt, + 'parent_id' => 2, + 'order' => 7, + 'title' => 'Extensions', + 'icon' => '', + 'uri' => 'auth/extensions', + 'created_at' => $createdAt, ], ]); diff --git a/src/Models/Administrator.php b/src/Models/Administrator.php index 0f2612f1a075cc11b4dac7b39e808f457ef12b93..0c6b44aba5bc8975a719b358eeca53ebbe772bf5 100755 --- a/src/Models/Administrator.php +++ b/src/Models/Administrator.php @@ -5,8 +5,8 @@ namespace Dcat\Admin\Models; use Dcat\Admin\Traits\HasDateTimeFormatter; use Dcat\Admin\Traits\HasPermissions; use Illuminate\Auth\Authenticatable; -use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Contracts\Auth\Access\Authorizable; +use Illuminate\Contracts\Auth\Authenticatable as AuthenticatableContract; use Illuminate\Database\Eloquent\Model; use Illuminate\Database\Eloquent\Relations\BelongsToMany; use Illuminate\Support\Facades\Storage; diff --git a/src/Models/Permission.php b/src/Models/Permission.php index f2529330de4b2c005cb07acdc7d852ba148687ba..20e96309797552efb770ec7b115a11c0df5c201c 100755 --- a/src/Models/Permission.php +++ b/src/Models/Permission.php @@ -134,7 +134,7 @@ class Permission extends Model implements Sortable } /** - * @param $path + * @param $path */ public function setHttpPathAttribute($path) { @@ -170,7 +170,7 @@ class Permission extends Model implements Sortable } /** - * @param $method + * @param $method */ public function setHttpMethodAttribute($method) { @@ -180,7 +180,7 @@ class Permission extends Model implements Sortable } /** - * @param $method + * @param $method * @return array */ public function getHttpMethodAttribute($method) diff --git a/src/Models/Role.php b/src/Models/Role.php index bb729c64a06d7749e14f7a6c0d4f08e22098c1d6..4bcee15514ec48189d758af1890e9b43946e3d63 100755 --- a/src/Models/Role.php +++ b/src/Models/Role.php @@ -79,7 +79,7 @@ class Role extends Model /** * Check user has permission. * - * @param $permission + * @param $permission * @return bool */ public function can(?string $permission): bool @@ -90,7 +90,7 @@ class Role extends Model /** * Check user has no permission. * - * @param $permission + * @param $permission * @return bool */ public function cannot(?string $permission): bool diff --git a/src/Repositories/EloquentRepository.php b/src/Repositories/EloquentRepository.php index 8c51dc8a0e3516d5c638057a356fdb2b95efb27e..25d4e63141d34b3ba359d4d7740994f27137876a 100755 --- a/src/Repositories/EloquentRepository.php +++ b/src/Repositories/EloquentRepository.php @@ -228,9 +228,9 @@ class EloquentRepository extends Repository implements TreeRepository /** * @param Grid\Model $model - * @param $column - * @param $type - * @param $cast + * @param $column + * @param $type + * @param $cast */ protected function setOrderBy(Grid\Model $model, $column, $type, $cast) { diff --git a/src/Scaffold/LangCreator.php b/src/Scaffold/LangCreator.php index 69b616c0f32f088122f3ab50ed08140b63e1f862..7c0be704f3c7342091206d689cb44cd66f1681ff 100755 --- a/src/Scaffold/LangCreator.php +++ b/src/Scaffold/LangCreator.php @@ -37,7 +37,7 @@ class LangCreator $controller => $title, Helper::slug($controller) => $title, ], - 'fields' => [], + 'fields' => [], 'options' => [], ]; foreach ($this->fields as $field) { diff --git a/src/Show.php b/src/Show.php index b80e2f5fc1456975f13bdee5e7fb34a5fa7ffa47..f545e99ee26333fc17911f70ee8004513d4d19db 100755 --- a/src/Show.php +++ b/src/Show.php @@ -28,8 +28,8 @@ class Show implements Renderable { use HasBuilderEvents; use Macroable { - __call as macroCall; - } + __call as macroCall; + } /** * @var string @@ -610,7 +610,7 @@ class Show implements Renderable } /** - * @param $method + * @param $method * @param array $arguments * @return bool|Show|Field|Relation */ @@ -670,7 +670,7 @@ class Show implements Renderable $this->callComposing(); $data = [ - 'panel' => $this->panel->fill($this->fields), + 'panel' => $this->panel->fill($this->fields), 'relations' => $this->relations, ]; diff --git a/src/Show/Field.php b/src/Show/Field.php index 6ff26c6c7e83c340af07a4d9842fc6028dc04d87..1035b461b1cd8ffd15f68c2b0c95f96e9b44ae27 100755 --- a/src/Show/Field.php +++ b/src/Show/Field.php @@ -22,8 +22,8 @@ class Field implements Renderable use HasBuilderEvents; use HasVariables; use Macroable { - __call as macroCall; - } + __call as macroCall; + } /** * @var array @@ -149,7 +149,7 @@ class Field implements Renderable /** * Format label. * - * @param $label + * @param $label * @return mixed */ protected function formatLabel($label) @@ -379,7 +379,7 @@ HTML; } /** - * @param $style + * @param $style * @return array */ public function formatStyle($style) @@ -707,10 +707,10 @@ HTML; { return [ 'content' => $this->value, - 'escape' => $this->escape, - 'label' => $this->getLabel(), + 'escape' => $this->escape, + 'label' => $this->getLabel(), 'wrapped' => $this->border, - 'width' => $this->width, + 'width' => $this->width, ]; } diff --git a/src/Show/Panel.php b/src/Show/Panel.php index ca0983d670d4b1d646712e7451be5500fb2abd26..c59a3b9acc3568983dc726d5d4a3e613646ddf23 100755 --- a/src/Show/Panel.php +++ b/src/Show/Panel.php @@ -54,10 +54,10 @@ class Panel implements Renderable { $this->variables = [ 'fields' => new Collection(), - 'tools' => new Tools($this), - 'rows' => $this->parent->rows(), - 'style' => 'default', - 'title' => trans('admin.detail'), + 'tools' => new Tools($this), + 'rows' => $this->parent->rows(), + 'style' => 'default', + 'title' => trans('admin.detail'), ]; } @@ -159,7 +159,7 @@ class Panel implements Renderable /** * Build panel tools. * - * @param $callable + * @param $callable * @return Tools|null */ public function tools($callable = null) diff --git a/src/Show/Row.php b/src/Show/Row.php index b14af7856d9e3365fcb80c2fd385ba2cbe383bf1..ff83f3109352387623e47381e31768112e489772 100644 --- a/src/Show/Row.php +++ b/src/Show/Row.php @@ -101,7 +101,7 @@ class Row implements Renderable /** * Add field. * - * @param $name + * @param $name * @return \Dcat\Admin\Show\Field|Collection */ public function __get($name) @@ -114,8 +114,8 @@ class Row implements Renderable } /** - * @param $method - * @param $arguments + * @param $method + * @param $arguments * @return \Dcat\Admin\Show\Field */ public function __call($method, $arguments) @@ -134,7 +134,7 @@ class Row implements Renderable protected function pushField($field) { $this->fields->push([ - 'width' => $this->defaultFieldWidth, + 'width' => $this->defaultFieldWidth, 'element' => $field, ]); } diff --git a/src/Show/Tools.php b/src/Show/Tools.php index bcddd89a0800f4c34e9bbf3dbc54d34506689122..be82cc5ae9a354e9d85d56b60f730060a83ff172 100755 --- a/src/Show/Tools.php +++ b/src/Show/Tools.php @@ -113,7 +113,7 @@ class Tools implements Renderable } /** - * @param $tool + * @param $tool * @return void */ protected function prepareTool($tool) diff --git a/src/Support/Composer.php b/src/Support/Composer.php index 6c2dcc0901a124b5c20a22f1a017cd1269c264a1..9ef309da5b117e89a71091d659415c0196e027a3 100755 --- a/src/Support/Composer.php +++ b/src/Support/Composer.php @@ -31,7 +31,7 @@ class Composer } /** - * @param $path + * @param $path * @return ComposerProperty */ public static function parse(?string $path) diff --git a/src/Support/ComposerProperty.php b/src/Support/ComposerProperty.php index 4cb3c1d621eaf4230d97252ec258c0f728a43c05..6b0e0157926e452a333622b99b9183114899097c 100755 --- a/src/Support/ComposerProperty.php +++ b/src/Support/ComposerProperty.php @@ -35,7 +35,7 @@ class ComposerProperty implements Arrayable } /** - * @param $key + * @param $key * @param null $default * @return mixed */ @@ -45,8 +45,8 @@ class ComposerProperty implements Arrayable } /** - * @param $key - * @param $val + * @param $key + * @param $val * @return $this */ public function set($key, $val) @@ -59,7 +59,7 @@ class ComposerProperty implements Arrayable } /** - * @param $key + * @param $key * @return $this */ public function delete($key) @@ -72,7 +72,7 @@ class ComposerProperty implements Arrayable } /** - * @param $name + * @param $name * @return mixed */ public function __get($name) diff --git a/src/Support/Helper.php b/src/Support/Helper.php index d62873ecc0066261cbb6b1adede07c9449e6be1a..71c592ff05ec906a0791ef8d7113b8f80a9cceab 100755 --- a/src/Support/Helper.php +++ b/src/Support/Helper.php @@ -22,16 +22,16 @@ class Helper * @var array */ public static $fileTypes = [ - 'image' => 'png|jpg|jpeg|tmp|gif', - 'word' => 'doc|docx', - 'excel' => 'xls|xlsx|csv', + 'image' => 'png|jpg|jpeg|tmp|gif', + 'word' => 'doc|docx', + 'excel' => 'xls|xlsx|csv', 'powerpoint' => 'ppt|pptx', - 'pdf' => 'pdf', - 'code' => 'php|js|java|python|ruby|go|c|cpp|sql|m|h|json|html|aspx', - 'archive' => 'zip|tar\.gz|rar|rpm', - 'txt' => 'txt|pac|log|md', - 'audio' => 'mp3|wav|flac|3pg|aa|aac|ape|au|m4a|mpc|ogg', - 'video' => 'mkv|rmvb|flv|mp4|avi|wmv|rm|asf|mpeg', + 'pdf' => 'pdf', + 'code' => 'php|js|java|python|ruby|go|c|cpp|sql|m|h|json|html|aspx', + 'archive' => 'zip|tar\.gz|rar|rpm', + 'txt' => 'txt|pac|log|md', + 'audio' => 'mp3|wav|flac|3pg|aa|aac|ape|au|m4a|mpc|ogg', + 'video' => 'mkv|rmvb|flv|mp4|avi|wmv|rm|asf|mpeg', ]; protected static $controllerNames = []; @@ -39,7 +39,7 @@ class Helper /** * 把给定的值转化为数组. * - * @param $value + * @param $value * @param bool $filter * @return array */ @@ -624,8 +624,8 @@ class Helper /** * 判断两个值是否相等. * - * @param $value1 - * @param $value2 + * @param $value1 + * @param $value2 * @return bool */ public static function equal($value1, $value2) diff --git a/src/Support/Setting.php b/src/Support/Setting.php index 3160dd01c83157242d28387cb6dedfef41677bc8..abbb29e63bc05d19f05ad6f68001e1261a1d6b8d 100644 --- a/src/Support/Setting.php +++ b/src/Support/Setting.php @@ -114,7 +114,7 @@ class Setting extends Fluent ->first() ?: new Model(); $model->fill([ - 'slug' => $key, + 'slug' => $key, 'value' => (string) $value, ])->save(); } diff --git a/src/Support/helpers.php b/src/Support/helpers.php index 7c17986efd9eb01e7a4d7661648432c919579527..cd0a6071dcd711b61fd2c0da4efe530a7ab9638a 100755 --- a/src/Support/helpers.php +++ b/src/Support/helpers.php @@ -156,7 +156,7 @@ if (! function_exists('admin_trans_field')) { /** * Translate the field name. * - * @param $field + * @param $field * @param null $locale * @return array|\Illuminate\Contracts\Translation\Translator|null|string */ @@ -170,7 +170,7 @@ if (! function_exists('admin_trans_label')) { /** * Translate the label. * - * @param $label + * @param $label * @param array $replace * @param null $locale * @return array|\Illuminate\Contracts\Translation\Translator|null|string @@ -185,7 +185,7 @@ if (! function_exists('admin_trans_option')) { /** * Translate the field name. * - * @param $field + * @param $field * @param array $replace * @param null $locale * @return array|\Illuminate\Contracts\Translation\Translator|null|string @@ -369,7 +369,7 @@ if (! function_exists('admin_info')) { if (! function_exists('admin_asset')) { /** - * @param $path + * @param $path * @return string */ function admin_asset($path) @@ -576,7 +576,7 @@ if (! function_exists('format_byte')) { /** * 文件单位换算. * - * @param $input + * @param $input * @param int $dec * @return string */ diff --git a/src/Traits/HasFormResponse.php b/src/Traits/HasFormResponse.php index 7d75ff4e67a9010ed1fc33d7df1af23fbc54ab98..053227ea6b300053533fbcf21fecfed0d9fcaef2 100644 --- a/src/Traits/HasFormResponse.php +++ b/src/Traits/HasFormResponse.php @@ -82,7 +82,7 @@ trait HasFormResponse /** * 响应数据. * - * @param $response + * @param $response * @return \Illuminate\Http\JsonResponse */ protected function sendResponse($response) diff --git a/src/Traits/HasPermissions.php b/src/Traits/HasPermissions.php index 573ac4ae390cac9f50ca5bd432e89e43380f81a8..6e009215520430b8111bc743c2bb833ae21f2b82 100644 --- a/src/Traits/HasPermissions.php +++ b/src/Traits/HasPermissions.php @@ -31,7 +31,7 @@ trait HasPermissions /** * Check if user has permission. * - * @param $ability + * @param $ability * @param array|mixed $arguments * @return bool */ @@ -56,7 +56,7 @@ trait HasPermissions /** * Check if user has no permission. * - * @param $permission + * @param $permission * @return bool */ public function cannot(string $permission): bool @@ -111,7 +111,7 @@ trait HasPermissions /** * If visible for roles. * - * @param $roles + * @param $roles * @return bool */ public function visible($roles = []): bool diff --git a/src/Traits/HasUploadedFile.php b/src/Traits/HasUploadedFile.php index 6f70125cba55c046b4bb3425ba0be3e402653002..a1580936e9ac5ba694723e53f1c1d635a9011e0a 100644 --- a/src/Traits/HasUploadedFile.php +++ b/src/Traits/HasUploadedFile.php @@ -90,10 +90,10 @@ trait HasUploadedFile public function responseUploaded(string $path, string $url) { return Admin::json([ - 'id' => $path, + 'id' => $path, 'name' => Helper::basename($path), 'path' => Helper::basename($path), - 'url' => $url, + 'url' => $url, ]); } @@ -111,8 +111,8 @@ trait HasUploadedFile /** * 响应失败信息. * - * @param $error - * @param $code + * @param $error + * @param $code * @return mixed */ public function responseErrorMessage($error) diff --git a/src/Traits/InteractsWithApi.php b/src/Traits/InteractsWithApi.php index daec6adba8f3dcd2bb7232df173a8ea2c4fcabc7..29fad505a4d0777329de1173bfe12644ce5886eb 100644 --- a/src/Traits/InteractsWithApi.php +++ b/src/Traits/InteractsWithApi.php @@ -41,7 +41,7 @@ trait InteractsWithApi */ protected $requestScripts = [ 'fetching' => [], - 'fetched' => [], + 'fetched' => [], ]; /** @@ -232,7 +232,7 @@ JS; private function formatRequestData() { $data = [ - '_key' => $this->getUriKey(), + '_key' => $this->getUriKey(), '_token' => csrf_token(), ]; diff --git a/src/Traits/LazyWidget.php b/src/Traits/LazyWidget.php index 868afc9070d707dc46d138e492a6249a7e5bbd1a..457ac43a1daa18972c2f1ec430edc62645807229 100644 --- a/src/Traits/LazyWidget.php +++ b/src/Traits/LazyWidget.php @@ -30,7 +30,7 @@ trait LazyWidget { $data = array_merge($this->payload, [ 'renderable' => $this->getRenderableName(), - '_trans_' => $this->translation(), + '_trans_' => $this->translation(), ]); return route(admin_api_route_name('render'), $data); diff --git a/src/Traits/Resizable.php b/src/Traits/Resizable.php index 7409b7d8b34b1bbd691669fa1002e26fa37ad2f8..2e34046f1a22eb74bf7b485e0672f0a332ec57b4 100644 --- a/src/Traits/Resizable.php +++ b/src/Traits/Resizable.php @@ -31,8 +31,8 @@ trait Resizable /** * Generate thumbnail URL. * - * @param $image - * @param $type + * @param $image + * @param $type * @return string */ public function getThumbnailPath($image, $type) diff --git a/src/Tree.php b/src/Tree.php index 28b0c3379f82320b558cb044dda0b8b4d19ec8de..e1ee1d10aa0a4f929686dc8af1fedfa3c24c8c7a 100755 --- a/src/Tree.php +++ b/src/Tree.php @@ -172,7 +172,7 @@ class Tree implements Renderable } /** - * @param $repository + * @param $repository * @return TreeRepository */ public function makeRepository($repository) @@ -521,18 +521,18 @@ class Tree implements Renderable public function defaultVariables() { return [ - 'id' => $this->elementId, - 'tools' => $this->tools->render(), - 'items' => $this->getItems(), - 'useCreate' => $this->useCreate, - 'useQuickCreate' => $this->useQuickCreate, - 'useSave' => $this->useSave, - 'useRefresh' => $this->useRefresh, - 'createButton' => $this->renderCreateButton(), + 'id' => $this->elementId, + 'tools' => $this->tools->render(), + 'items' => $this->getItems(), + 'useCreate' => $this->useCreate, + 'useQuickCreate' => $this->useQuickCreate, + 'useSave' => $this->useSave, + 'useRefresh' => $this->useRefresh, + 'createButton' => $this->renderCreateButton(), 'nestableOptions' => $this->nestableOptions, - 'url' => $this->url, - 'resolveAction' => $this->resolveAction(), - 'expand' => $this->expand, + 'url' => $this->url, + 'resolveAction' => $this->resolveAction(), + 'expand' => $this->expand, ]; } @@ -648,9 +648,9 @@ class Tree implements Renderable $this->renderQuickCreateButton(); view()->share([ - 'currentUrl' => $this->url, - 'keyName' => $this->getKeyName(), - 'branchView' => $this->branchView, + 'currentUrl' => $this->url, + 'keyName' => $this->getKeyName(), + 'branchView' => $this->branchView, 'branchCallback' => $this->branchCallback, ]); diff --git a/src/Tree/Actions.php b/src/Tree/Actions.php index b08cc6aeda74b12a2cdf100511cbeda5d8305bd8..ac57c90f975d8b11d598d493971a9d5ed80f2fde 100644 --- a/src/Tree/Actions.php +++ b/src/Tree/Actions.php @@ -32,18 +32,18 @@ class Actions implements Renderable * @var array */ protected $actions = [ - 'delete' => true, + 'delete' => true, 'quickEdit' => true, - 'edit' => false, + 'edit' => false, ]; /** * @var array */ protected $defaultActions = [ - 'edit' => Tree\Actions\Edit::class, + 'edit' => Tree\Actions\Edit::class, 'quickEdit' => Tree\Actions\QuickEdit::class, - 'delete' => Tree\Actions\Delete::class, + 'delete' => Tree\Actions\Delete::class, ]; /** diff --git a/src/Widgets/Alert.php b/src/Widgets/Alert.php index 251bdcfe8564fa1ce79ada3ea6e72fef0ff76e5f..595f1a01fb82c26baeedc346067dd1a6a4855c12 100755 --- a/src/Widgets/Alert.php +++ b/src/Widgets/Alert.php @@ -140,10 +140,10 @@ class Alert extends Widget $this->class("alert alert-{$this->style} alert-dismissable"); return [ - 'title' => $this->title, - 'content' => $this->content, - 'icon' => $this->icon, - 'attributes' => $this->formatHtmlAttributes(), + 'title' => $this->title, + 'content' => $this->content, + 'icon' => $this->icon, + 'attributes' => $this->formatHtmlAttributes(), 'showCloseBtn' => $this->showCloseBtn, ]; } diff --git a/src/Widgets/ApexCharts/Chart.php b/src/Widgets/ApexCharts/Chart.php index 0adeaf7a03b5f4071349b7fd08807ad7077cf81a..ab80d074d4f8e7dad6f5b6cb53bdf779a8085e46 100644 --- a/src/Widgets/ApexCharts/Chart.php +++ b/src/Widgets/ApexCharts/Chart.php @@ -292,9 +292,9 @@ HTML; public function valueResult() { return [ - 'status' => 1, + 'status' => 1, 'selector' => $this->containerSelector, - 'options' => $this->formatScriptOptions(), + 'options' => $this->formatScriptOptions(), ]; } diff --git a/src/Widgets/Box.php b/src/Widgets/Box.php index 7e9c7a2f1b311f986c2bc23ee3b49b230c2b0ca8..1e22090cebd15039e6adb304427c56c900eb6664 100755 --- a/src/Widgets/Box.php +++ b/src/Widgets/Box.php @@ -140,11 +140,11 @@ class Box extends Widget public function defaultVariables() { return [ - 'title' => $this->title, - 'content' => $this->toString($this->content), - 'tools' => $this->tools, + 'title' => $this->title, + 'content' => $this->toString($this->content), + 'tools' => $this->tools, 'attributes' => $this->formatHtmlAttributes(), - 'padding' => $this->padding, + 'padding' => $this->padding, ]; } } diff --git a/src/Widgets/Callout.php b/src/Widgets/Callout.php index 68c4fc49f807b00aa041061e7ff32bc6318a91ad..941e12cb43b48561aa164d1aa4696b967ec39ce1 100644 --- a/src/Widgets/Callout.php +++ b/src/Widgets/Callout.php @@ -139,9 +139,9 @@ class Callout extends Widget $this->class("callout callout-{$this->style} alert alert-dismissable"); return [ - 'title' => $this->title, - 'content' => $this->content, - 'attributes' => $this->formatHtmlAttributes(), + 'title' => $this->title, + 'content' => $this->content, + 'attributes' => $this->formatHtmlAttributes(), 'showCloseBtn' => $this->showCloseBtn, ]; } diff --git a/src/Widgets/Card.php b/src/Widgets/Card.php index 36cda0ef0dc05260e6a519b8e08a34a9db55da87..95cd25252588f3effa1db2d40cc5029c536c5c84 100755 --- a/src/Widgets/Card.php +++ b/src/Widgets/Card.php @@ -112,13 +112,13 @@ class Card extends Widget public function defaultVariables() { return [ - 'title' => $this->title, - 'content' => $this->toString($this->content), - 'footer' => $this->toString($this->footer), - 'tools' => $this->tools, + 'title' => $this->title, + 'content' => $this->toString($this->content), + 'footer' => $this->toString($this->footer), + 'tools' => $this->tools, 'attributes' => $this->formatHtmlAttributes(), - 'padding' => $this->padding, - 'divider' => $this->divider, + 'padding' => $this->padding, + 'divider' => $this->divider, ]; } } diff --git a/src/Widgets/DialogForm.php b/src/Widgets/DialogForm.php index abc57074d395a68707dd5bf2c5b8e16e726a045f..0ea6b3ce10a1fa0f4cdc591f85b8176e906f254c 100644 --- a/src/Widgets/DialogForm.php +++ b/src/Widgets/DialogForm.php @@ -21,23 +21,23 @@ class DialogForm * @var array */ protected $options = [ - 'title' => 'Form', - 'area' => ['700px', '670px'], - 'defaultUrl' => null, + 'title' => 'Form', + 'area' => ['700px', '670px'], + 'defaultUrl' => null, 'buttonSelector' => null, - 'query' => null, - 'lang' => null, - 'forceRefresh' => false, - 'resetButton' => true, + 'query' => null, + 'lang' => null, + 'forceRefresh' => false, + 'resetButton' => true, ]; /** * @var array */ protected $handlers = [ - 'saved' => null, + 'saved' => null, 'success' => null, - 'error' => null, + 'error' => null, ]; public function __construct(?string $title = null, $url = null) @@ -252,7 +252,7 @@ JS { $this->options['lang'] = [ 'submit' => trans('admin.submit'), - 'reset' => trans('admin.reset'), + 'reset' => trans('admin.reset'), ]; $this->options['query'] = static::QUERY_NAME; diff --git a/src/Widgets/DialogTable.php b/src/Widgets/DialogTable.php index 766728ef343e35c234367f9cc16bcb20d5a358e2..a963a048a08fcfc4d7fd18a9ac72867962819f4a 100644 --- a/src/Widgets/DialogTable.php +++ b/src/Widgets/DialogTable.php @@ -218,10 +218,10 @@ class DialogTable extends Widget public function render() { $this->addVariables([ - 'title' => $this->title, - 'width' => $this->width, + 'title' => $this->title, + 'width' => $this->width, 'button' => $this->renderButton(), - 'table' => $this->renderTable(), + 'table' => $this->renderTable(), 'footer' => $this->renderFooter(), 'events' => $this->events, 'maxmin' => $this->maxmin, diff --git a/src/Widgets/Dropdown.php b/src/Widgets/Dropdown.php index 9be0e7b807ad461b5ba55946f035a611ee125e49..4cf8a3499111813f81b9f8d2932c8baa413703ba 100644 --- a/src/Widgets/Dropdown.php +++ b/src/Widgets/Dropdown.php @@ -20,7 +20,7 @@ class Dropdown extends Widget * @var array */ protected $button = [ - 'text' => null, + 'text' => null, 'class' => 'btn btn-sm btn-white waves-effect', 'style' => null, ]; @@ -236,10 +236,10 @@ class Dropdown extends Widget public function render() { $this->addVariables([ - 'options' => $this->renderOptions(), - 'button' => $this->button, - 'buttonId' => $this->buttonId, - 'click' => $this->click, + 'options' => $this->renderOptions(), + 'button' => $this->button, + 'buttonId' => $this->buttonId, + 'click' => $this->click, 'direction' => $this->direction, ]); diff --git a/src/Widgets/Form.php b/src/Widgets/Form.php index 5af92c534eb4d14aa3ce12048ccb8fea67fb0148..00505aa9239adde92bc94aeacba227bafd7417df 100755 --- a/src/Widgets/Form.php +++ b/src/Widgets/Form.php @@ -209,7 +209,7 @@ class Form implements Renderable if ($field instanceof Field\Embeds || $field instanceof Field\HasMany) { $field->resolvingField(function ($field) use ($formData) { - if (($field instanceof Field\File)) { + if ($field instanceof Field\File) { $this->setFileUploadUrl($field, $formData); } }); @@ -231,8 +231,8 @@ class Form implements Renderable protected function initFormAttributes() { $this->setHtmlAttribute([ - 'method' => 'POST', - 'class' => 'form-horizontal', + 'method' => 'POST', + 'class' => 'form-horizontal', 'accept-charset' => 'UTF-8', 'pjax-container' => true, ]); @@ -597,15 +597,15 @@ class Form implements Renderable $this->fillFields($this->model()->toArray()); return array_merge([ - 'start' => $this->open(), - 'end' => $this->close(), - 'fields' => $this->fields, - 'method' => $this->getHtmlAttribute('method'), - 'rows' => $this->rows(), - 'layout' => $this->layout(), + 'start' => $this->open(), + 'end' => $this->close(), + 'fields' => $this->fields, + 'method' => $this->getHtmlAttribute('method'), + 'rows' => $this->rows(), + 'layout' => $this->layout(), 'elementId' => $this->getElementId(), - 'ajax' => $this->ajax, - 'footer' => $this->renderFooter(), + 'ajax' => $this->ajax, + 'footer' => $this->renderFooter(), ], $this->variables); } @@ -719,7 +719,7 @@ HTML; } /** - * @param $id + * @param $id * @return $this */ public function setFormId($id) diff --git a/src/Widgets/Markdown.php b/src/Widgets/Markdown.php index 1a9419e9db30ae5c604c6b8149ec5b46dca67d66..22f9b68dd4a20eb46f2f02c23718fe8388b1d0dd 100755 --- a/src/Widgets/Markdown.php +++ b/src/Widgets/Markdown.php @@ -21,11 +21,11 @@ class Markdown extends Widget * @var array */ protected $options = [ - 'htmlDecode' => 'style,script,iframe', - 'emoji' => true, - 'taskList' => true, - 'tex' => true, - 'flowChart' => true, + 'htmlDecode' => 'style,script,iframe', + 'emoji' => true, + 'taskList' => true, + 'tex' => true, + 'flowChart' => true, 'sequenceDiagram' => true, ]; @@ -57,7 +57,7 @@ class Markdown extends Widget public function render() { $this->addVariables([ - 'id' => $this->id(), + 'id' => $this->id(), 'content' => $this->renderContent(), ]); diff --git a/src/Widgets/Metrics/Round.php b/src/Widgets/Metrics/Round.php index f787f84c527efe94d860965ee8d85ecc3eaa38a3..0a8e89e0bfcddf4bde40f3dc70d21c09849963bb 100644 --- a/src/Widgets/Metrics/Round.php +++ b/src/Widgets/Metrics/Round.php @@ -16,11 +16,11 @@ class Round extends RadialBar * @var array */ protected $options = [ - 'icon' => null, - 'title' => null, - 'header' => null, - 'content' => null, - 'footer' => null, + 'icon' => null, + 'title' => null, + 'header' => null, + 'content' => null, + 'footer' => null, 'dropdown' => [], ]; @@ -138,8 +138,8 @@ class Round extends RadialBar public function chartTotal(string $label, int $number) { return $this->chartOption('plotOptions.radialBar.dataLabels.total', [ - 'show' => true, - 'label' => $label, + 'show' => true, + 'label' => $label, 'formatter' => JavaScript::make("function () { return {$number}; }"), ]); } diff --git a/src/Widgets/Radio.php b/src/Widgets/Radio.php index 67965c4620044ccbb69c8a05b9b14fb677bec1a8..fbf767e9020ee21f8b1b9ba18e5ada4879750c63 100755 --- a/src/Widgets/Radio.php +++ b/src/Widgets/Radio.php @@ -150,14 +150,14 @@ class Radio extends Widget public function defaultVariables() { return [ - 'style' => $this->style, - 'options' => $this->options, + 'style' => $this->style, + 'options' => $this->options, 'attributes' => $this->formatHtmlAttributes(), - 'checked' => $this->checked, - 'disabled' => $this->disabledValues, - 'right' => $this->right, - 'size' => $this->size, - 'inline' => $this->inline, + 'checked' => $this->checked, + 'disabled' => $this->disabledValues, + 'right' => $this->right, + 'size' => $this->size, + 'inline' => $this->inline, ]; } diff --git a/src/Widgets/Tab.php b/src/Widgets/Tab.php index d2d5570b78fce33241899c0fa58c7655509106cb..bfea87ab85970c39c14f8bdec6509cb70eaabe8b 100755 --- a/src/Widgets/Tab.php +++ b/src/Widgets/Tab.php @@ -19,12 +19,12 @@ class Tab extends Widget * @var array */ protected $data = [ - 'id' => '', - 'title' => '', - 'tabs' => [], + 'id' => '', + 'title' => '', + 'tabs' => [], 'dropDown' => [], - 'active' => 0, - 'padding' => null, + 'active' => 0, + 'padding' => null, 'tabStyle' => '', ]; @@ -40,10 +40,10 @@ class Tab extends Widget public function add($title, $content, $active = false, $id = null) { $this->data['tabs'][] = [ - 'id' => $id ?: mt_rand(), - 'title' => $title, + 'id' => $id ?: mt_rand(), + 'title' => $title, 'content' => $this->toString($this->formatRenderable($content)), - 'type' => static::TYPE_CONTENT, + 'type' => static::TYPE_CONTENT, ]; if ($active) { @@ -64,10 +64,10 @@ class Tab extends Widget public function addLink($title, $href, $active = false) { $this->data['tabs'][] = [ - 'id' => mt_rand(), - 'title' => $title, - 'href' => $href, - 'type' => static::TYPE_LINK, + 'id' => mt_rand(), + 'title' => $title, + 'href' => $href, + 'type' => static::TYPE_LINK, ]; if ($active) { diff --git a/src/Widgets/Table.php b/src/Widgets/Table.php index 8a375648c511af846717a76778364bb9ef56d0a0..641fc3f5ead7fcc9c3896a860bae498f0cc7d60d 100644 --- a/src/Widgets/Table.php +++ b/src/Widgets/Table.php @@ -136,8 +136,8 @@ class Table extends Widget public function render() { $vars = [ - 'headers' => $this->headers, - 'rows' => $this->rows, + 'headers' => $this->headers, + 'rows' => $this->rows, 'attributes' => $this->formatHtmlAttributes(), ]; diff --git a/src/Widgets/Tooltip.php b/src/Widgets/Tooltip.php index 842e97604cfbc85cbf99de882afdea93971410b8..152b641957f434d156cabbfa5a1fc0fdaeaf2f0e 100755 --- a/src/Widgets/Tooltip.php +++ b/src/Widgets/Tooltip.php @@ -103,10 +103,10 @@ class Tooltip extends Widget public function placement(string $placement = 'auto') { $map = [ - 'top' => 1, - 'right' => 2, + 'top' => 1, + 'right' => 2, 'bottom' => 3, - 'left' => 4, + 'left' => 4, ]; $this->placement = $map[$placement] ?? 1; diff --git a/src/Widgets/Tree.php b/src/Widgets/Tree.php index 26c14e9536d5fbfe218f83610edf339e36e3f425..99c6d7cf765a80ccddf51de7ee3094f77c6119f0 100755 --- a/src/Widgets/Tree.php +++ b/src/Widgets/Tree.php @@ -12,11 +12,11 @@ class Tree extends Widget protected $options = [ 'plugins' => ['checkbox', 'types'], - 'core' => [ + 'core' => [ 'check_callback' => true, 'themes' => [ - 'name' => 'proton', + 'name' => 'proton', 'responsive' => true, ], ], @@ -33,8 +33,8 @@ class Tree extends Widget protected $id; protected $columnNames = [ - 'id' => 'id', - 'text' => 'name', + 'id' => 'id', + 'text' => 'name', 'parent' => 'parent_id', ]; @@ -116,7 +116,7 @@ class Tree extends Widget $this->formatNodes(); $this->variables = [ - 'id' => $this->id, + 'id' => $this->id, 'nodes' => &$this->nodes, ]; @@ -160,10 +160,10 @@ class Tree extends Widget $v['state']['disabled'] = true; $nodes[] = [ - 'id' => $v[$idColumn], - 'text' => $v[$textColumn] ?? null, + 'id' => $v[$idColumn], + 'text' => $v[$textColumn] ?? null, 'parent' => $parentId, - 'state' => $v['state'], + 'state' => $v['state'], ]; } diff --git a/src/Widgets/Widget.php b/src/Widgets/Widget.php index ebddfd2eebe0ffaa5fff94fc089c775d2424f3df..0625392db0e1f611549621d0208a2b9a5547c598 100755 --- a/src/Widgets/Widget.php +++ b/src/Widgets/Widget.php @@ -137,9 +137,9 @@ abstract class Widget implements Renderable { return [ 'attributes' => $this->formatHtmlAttributes(), - 'options' => $this->options, - 'class' => $this->getElementClass(), - 'selector' => $this->getElementSelector(), + 'options' => $this->options, + 'class' => $this->getElementClass(), + 'selector' => $this->getElementSelector(), ]; } @@ -163,7 +163,7 @@ abstract class Widget implements Renderable } /** - * @param $value + * @param $value * @return string */ protected function toString($value) @@ -297,8 +297,8 @@ abstract class Widget implements Renderable } /** - * @param $method - * @param $parameters + * @param $method + * @param $parameters * @return $this */ public function __call($method, $parameters) diff --git a/tests/Browser/Cases/AuthTest.php b/tests/Browser/Cases/AuthTest.php index 93447cce97043858b6444e24f464698d86f2002a..fcf5b54010d3371e697841b93af545790a724db9 100644 --- a/tests/Browser/Cases/AuthTest.php +++ b/tests/Browser/Cases/AuthTest.php @@ -51,9 +51,9 @@ class AuthTest extends TestCase ->assertSeeText('New Users') ->assertSeeText('New Devices') ->assertSeeText('Tickets') - ->assertSeeText((__('admin.documentation'))) - ->assertSeeText((__('admin.extensions'))) - ->assertSeeText((__('admin.demo'))) + ->assertSeeText(__('admin.documentation')) + ->assertSeeText(__('admin.extensions')) + ->assertSeeText(__('admin.demo')) ->assertSeeText('GITHUB'); $browser->within('.main-menu-content', function (Browser $browser) { @@ -71,7 +71,7 @@ class AuthTest extends TestCase /** * 翻译菜单标题. * - * @param $title + * @param $title * @return string */ protected function translateMenuTitle($title) diff --git a/tests/Browser/Cases/Form/HasManyTest.php b/tests/Browser/Cases/Form/HasManyTest.php index 85174f0a76594e3dffce19d2b6a9e46beac27f72..40408568de904ce73538f60d9941298568215994 100644 --- a/tests/Browser/Cases/Form/HasManyTest.php +++ b/tests/Browser/Cases/Form/HasManyTest.php @@ -103,7 +103,7 @@ class HasManyTest extends TestCase { return [ 'username' => 'uuu', - 'bio' => 'bxbxbxbxbxbx', + 'bio' => 'bxbxbxbxbxbx', 'paintings' => [ [ 'title' => '蒙娜丽莎', diff --git a/tests/Browser/Cases/IndexTest.php b/tests/Browser/Cases/IndexTest.php index f14957fe8a0ecf421ab47211d0f6f14ff456e108..12183372332cbcf1259f5a4cd9585c2d882d385c 100644 --- a/tests/Browser/Cases/IndexTest.php +++ b/tests/Browser/Cases/IndexTest.php @@ -65,7 +65,7 @@ class IndexTest extends TestCase /** * 翻译菜单标题. * - * @param $title + * @param $title * @return string */ protected function translateMenuTitle($title) diff --git a/tests/Browser/Cases/MenuTest.php b/tests/Browser/Cases/MenuTest.php index 8940cfbb6a2626fd551dd8b8697c2b5b55d984cd..c026ef91671e342aa22107997ca83e0c4228bc6d 100644 --- a/tests/Browser/Cases/MenuTest.php +++ b/tests/Browser/Cases/MenuTest.php @@ -29,11 +29,11 @@ class MenuTest extends TestCase { $this->browse(function (Browser $browser) { $item = [ - 'parent_id' => '0', - 'title' => 'Test', - 'uri' => 'test', - 'icon' => 'fa-user', - 'roles' => [1], + 'parent_id' => '0', + 'title' => 'Test', + 'uri' => 'test', + 'icon' => 'fa-user', + 'roles' => [1], 'permissions' => [4, 5], ]; @@ -93,10 +93,10 @@ class MenuTest extends TestCase $id = 5; $updates = [ - 'title' => 'balabala', - 'icon' => 'fa-list', - 'parent_id' => 0, - 'roles' => 1, + 'title' => 'balabala', + 'icon' => 'fa-list', + 'parent_id' => 0, + 'roles' => 1, 'permissions' => [4, 5, 6], ]; diff --git a/tests/Browser/Components/Form/Field/HasMany.php b/tests/Browser/Components/Form/Field/HasMany.php index 95e15c4315d8620978b1e06396830463f68bafc8..6a2cc26bdbb0ba52b3303c467becf25f7257771c 100644 --- a/tests/Browser/Components/Form/Field/HasMany.php +++ b/tests/Browser/Components/Form/Field/HasMany.php @@ -178,7 +178,7 @@ JS public function assertFormGroupInputValue(Browser $browser, $field, $value, $id = null) { $input = $browser->script( - <<getFieldSelector($browser, $field, $id)}').val(); JS )[0] ?? null; @@ -190,8 +190,8 @@ JS * 填充字段数据. * * @param \Laravel\Dusk\Browser $browser - * @param $field - * @param $value + * @param $field + * @param $value * @param null $id */ public function fillFieldValue(Browser $browser, $field, $value, $id = null) @@ -206,7 +206,7 @@ JS /** * 获取元素选择器. * - * @param $field + * @param $field * @param null $id * @return array|string */ diff --git a/tests/Browser/Components/Form/Field/Tree.php b/tests/Browser/Components/Form/Field/Tree.php index a78dc3007aa4e027e0d3a4629637af1f558c3149..21c9479773c2e0784acaeb6934536bcf03c9e390 100644 --- a/tests/Browser/Components/Form/Field/Tree.php +++ b/tests/Browser/Components/Form/Field/Tree.php @@ -47,8 +47,8 @@ class Tree extends Component { return [ '@container' => (new Field($this->name))->getElementClassSelector(), - '@tree' => '.da-tree', - '@input' => sprintf('input[name="%s"][type="hidden"]', $this->name), + '@tree' => '.da-tree', + '@input' => sprintf('input[name="%s"][type="hidden"]', $this->name), ]; } diff --git a/tests/BrowserExtension.php b/tests/BrowserExtension.php index 6bb205a0a23b42abcd048ae352fb4030a5b5ab66..a81533d01da7f8222ad046b1ae0b389b816fe477 100644 --- a/tests/BrowserExtension.php +++ b/tests/BrowserExtension.php @@ -166,7 +166,7 @@ JS public function __call($method, $arguments = []) { $this->callbacks[] = [ - 'method' => $method, + 'method' => $method, 'arguments' => $arguments, ]; diff --git a/tests/Controllers/UserController.php b/tests/Controllers/UserController.php index 847a6fa957b7d635274dff32eed19eb37a1a2015..d35ba44e6535a60f536cfd29610c8b2c52665ae4 100644 --- a/tests/Controllers/UserController.php +++ b/tests/Controllers/UserController.php @@ -28,7 +28,7 @@ class UserController extends AdminController /** * Edit interface. * - * @param $id + * @param $id * @return Content */ public function edit($id, Content $content) diff --git a/tests/Repositories/Report.php b/tests/Repositories/Report.php index 4625234636915f782ab703bc903592f270fa8e68..092ea72a22ef70b679992e674d388d939766c8fc 100644 --- a/tests/Repositories/Report.php +++ b/tests/Repositories/Report.php @@ -39,20 +39,20 @@ class Report extends Repository for ($i = 0; $i < 20; $i++) { $data[] = [ - 'content' => $faker->text, - 'cost' => $faker->randomFloat(), - 'avgMonthCost' => $faker->randomFloat(), + 'content' => $faker->text, + 'cost' => $faker->randomFloat(), + 'avgMonthCost' => $faker->randomFloat(), 'avgQuarterCost' => $faker->randomFloat(), - 'avgYearCost' => $faker->randomFloat(), - 'incrs' => $faker->numberBetween(1, 999999999), - 'avgMonthVist' => $faker->numberBetween(1, 999999), + 'avgYearCost' => $faker->randomFloat(), + 'incrs' => $faker->numberBetween(1, 999999999), + 'avgMonthVist' => $faker->numberBetween(1, 999999), 'avgQuarterVist' => $faker->numberBetween(1, 999999), - 'avgYearVist' => $faker->numberBetween(1, 999999), - 'avgVists' => $faker->numberBetween(1, 999999), - 'topCost' => $faker->numberBetween(1, 999999999), - 'topVist' => $faker->numberBetween(1, 9999990009), - 'topIncr' => $faker->numberBetween(1, 99999999), - 'date' => $faker->date(), + 'avgYearVist' => $faker->numberBetween(1, 999999), + 'avgVists' => $faker->numberBetween(1, 999999), + 'topCost' => $faker->numberBetween(1, 999999999), + 'topVist' => $faker->numberBetween(1, 9999990009), + 'topIncr' => $faker->numberBetween(1, 99999999), + 'date' => $faker->date(), ]; } diff --git a/tests/resources/config/admin.php b/tests/resources/config/admin.php index 31102874d37dfb7f288276088a99361035fcaf85..9f7ad606ca0030c00db7928136c8ba3ceff5058b 100644 --- a/tests/resources/config/admin.php +++ b/tests/resources/config/admin.php @@ -125,7 +125,7 @@ return [ 'guards' => [ 'admin' => [ - 'driver' => 'session', + 'driver' => 'session', 'provider' => 'admin', ], ], @@ -133,7 +133,7 @@ return [ 'providers' => [ 'admin' => [ 'driver' => 'eloquent', - 'model' => Dcat\Admin\Models\Administrator::class, + 'model' => Dcat\Admin\Models\Administrator::class, ], ], @@ -201,7 +201,7 @@ return [ 'cache' => [ // enable cache or not 'enable' => false, - 'store' => 'file', + 'store' => 'file', ], // Whether enable menu bind to a permission. @@ -226,7 +226,7 @@ return [ // Image and file upload path under the disk above. 'directory' => [ 'image' => 'images', - 'file' => 'files', + 'file' => 'files', ], ], @@ -260,12 +260,12 @@ return [ 'menu_model' => Dcat\Admin\Models\Menu::class, // Pivot table for table above. - 'role_users_table' => 'admin_role_users', + 'role_users_table' => 'admin_role_users', 'role_permissions_table' => 'admin_role_permissions', - 'role_menu_table' => 'admin_role_menu', - 'permission_menu_table' => 'admin_permission_menu', - 'settings_table' => 'admin_settings', - 'extensions_table' => 'admin_extensions', + 'role_menu_table' => 'admin_role_menu', + 'permission_menu_table' => 'admin_permission_menu', + 'settings_table' => 'admin_settings', + 'extensions_table' => 'admin_extensions', 'extension_histories_table' => 'admin_extension_histories', ], diff --git a/tests/resources/config/filesystems.php b/tests/resources/config/filesystems.php index 4b0a99ea123d7708b36629248ebebfba89a12e99..5eb6ada1b36c683b0333edd16c5b750777a49fc7 100644 --- a/tests/resources/config/filesystems.php +++ b/tests/resources/config/filesystems.php @@ -45,49 +45,49 @@ return [ 'local' => [ 'driver' => 'local', - 'root' => storage_path('app'), + 'root' => storage_path('app'), ], 'public' => [ - 'driver' => 'local', - 'root' => storage_path('app/public'), + 'driver' => 'local', + 'root' => storage_path('app/public'), 'visibility' => 'public', ], 's3' => [ 'driver' => 's3', - 'key' => 'your-key', + 'key' => 'your-key', 'secret' => 'your-secret', 'region' => 'your-region', 'bucket' => 'your-bucket', ], 'admin' => [ - 'driver' => 'local', - 'root' => public_path('uploads'), + 'driver' => 'local', + 'root' => public_path('uploads'), 'visibility' => 'public', - 'url' => 'http://localhost:8000/uploads/', + 'url' => 'http://localhost:8000/uploads/', ], 'qiniu' => [ - 'driver' => 'qiniu', + 'driver' => 'qiniu', 'domains' => [ 'default' => 'of8kfibjo.bkt.clouddn.com', //你的七牛域名 - 'https' => 'dn-yourdomain.qbox.me', //你的HTTPS域名 - 'custom' => 'static.abc.com', //你的自定义域名 + 'https' => 'dn-yourdomain.qbox.me', //你的HTTPS域名 + 'custom' => 'static.abc.com', //你的自定义域名 ], 'access_key' => 'tIyz5h5IDT1-PQS22iRrI4dCBEktWj76O-ls856K', //AccessKey 'secret_key' => 'TCU2GuSlbzxKgnixYO_-pdo4odbXttm1RNNvEwSD', //SecretKey - 'bucket' => 'laravel', //Bucket名字 + 'bucket' => 'laravel', //Bucket名字 'notify_url' => '', //持久化处理回调地址 ], 'aliyun' => [ - 'driver' => 'oss', - 'access_id' => 'LTAIsOQNIDQN78Jr', + 'driver' => 'oss', + 'access_id' => 'LTAIsOQNIDQN78Jr', 'access_key' => 'ChsYewaCxm1mi7AIBPRniuncEbFHNO', - 'bucket' => 'laravel-admin', - 'endpoint' => 'oss-cn-shanghai.aliyuncs.com', + 'bucket' => 'laravel-admin', + 'endpoint' => 'oss-cn-shanghai.aliyuncs.com', ], ], diff --git a/tests/resources/lang/en/user.php b/tests/resources/lang/en/user.php index 96e9447fb93ca279584bb3b325ceb3df26a7dcc8..1970fae048c5a7b8c73049eea60c55ad71404d3c 100644 --- a/tests/resources/lang/en/user.php +++ b/tests/resources/lang/en/user.php @@ -3,7 +3,7 @@ return [ 'fields' => [ 'username' => '用户名', - 'email' => '邮箱', + 'email' => '邮箱', 'profile' => [ 'postcode' => '邮政编码', diff --git a/tests/resources/seeds/factory.php b/tests/resources/seeds/factory.php index 69f31acbb6663af098b8d3e330f021f6862fcc4c..bbed4fc7feea3e5de364dd1853bbbf22c242da29 100644 --- a/tests/resources/seeds/factory.php +++ b/tests/resources/seeds/factory.php @@ -8,9 +8,9 @@ $factory = app(Factory::class); $factory->define(\Tests\Models\User::class, function (Faker $faker) { return [ 'username' => $faker->userName, - 'email' => $faker->email, - 'mobile' => $faker->phoneNumber, - 'avatar' => $faker->imageUrl(), + 'email' => $faker->email, + 'mobile' => $faker->phoneNumber, + 'avatar' => $faker->imageUrl(), 'password' => bcrypt('123456'), ]; }); @@ -18,14 +18,14 @@ $factory->define(\Tests\Models\User::class, function (Faker $faker) { $factory->define(\Tests\Models\Profile::class, function (Faker $faker) { return [ 'first_name' => $faker->firstName, - 'last_name' => $faker->lastName, - 'postcode' => $faker->postcode, - 'address' => $faker->address, - 'latitude' => $faker->latitude, - 'longitude' => $faker->longitude, - 'color' => $faker->hexColor, - 'start_at' => $faker->dateTime, - 'end_at' => $faker->dateTime, + 'last_name' => $faker->lastName, + 'postcode' => $faker->postcode, + 'address' => $faker->address, + 'latitude' => $faker->latitude, + 'longitude' => $faker->longitude, + 'color' => $faker->hexColor, + 'start_at' => $faker->dateTime, + 'end_at' => $faker->dateTime, ]; }); diff --git a/tests/resources/stubs/ComposerConfigCommand.php b/tests/resources/stubs/ComposerConfigCommand.php index 5bbda714a9410b7e3282e5dbe9ac218e44cb2a64..4f5a3f5b2192e52c8b18b414183e94f6e3e0a625 100644 --- a/tests/resources/stubs/ComposerConfigCommand.php +++ b/tests/resources/stubs/ComposerConfigCommand.php @@ -20,7 +20,7 @@ class ComposerConfigCommand extends Command $contents['repositories'] = [ [ 'type' => 'path', - 'url' => './dcat-admin', + 'url' => './dcat-admin', ], ]; diff --git a/tests/routes.php b/tests/routes.php index cf5b18861a6962c36ac149f9feed9f484b6356b5..763c13d20fa635ede4c264114c85d6cc46620917 100644 --- a/tests/routes.php +++ b/tests/routes.php @@ -7,16 +7,16 @@ use Illuminate\Support\Facades\Route; Admin::routes(); Route::group([ - 'prefix' => config('admin.route.prefix'), - 'namespace' => config('admin.route.namespace'), + 'prefix' => config('admin.route.prefix'), + 'namespace' => config('admin.route.namespace'), 'middleware' => config('admin.route.middleware'), ], function (Router $router) { $router->get('/', 'HomeController@index'); }); Route::group([ - 'prefix' => config('admin.route.prefix'), - 'namespace' => 'Tests\Controllers', + 'prefix' => config('admin.route.prefix'), + 'namespace' => 'Tests\Controllers', 'middleware' => ['web', 'admin'], ], function (Router $router) { $router->resource('tests/users', UserController::class);