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[] = "