diff --git a/docs/.vitepress/nav.ts b/docs/.vitepress/nav.ts index 0fe7ddcbc..3b3b102f3 100644 --- a/docs/.vitepress/nav.ts +++ b/docs/.vitepress/nav.ts @@ -6,7 +6,7 @@ export default [ items: [ {text: "代码片段", link: '/partials/migrations'}, {text: "小技巧", link: '/tips/db-models-and-eloquent'}, - {text: "常用扩展", link: "/packages/pail"}, + {text: "常用扩展", link: "/packages/"}, {text: '其他', link: '/others/laravel-create-custom-facade-test-demo'}, ] }, diff --git a/docs/.vitepress/sidebar.ts b/docs/.vitepress/sidebar.ts index 692ba120a..49ab79153 100644 --- a/docs/.vitepress/sidebar.ts +++ b/docs/.vitepress/sidebar.ts @@ -4,7 +4,10 @@ export default { text: '一些示例', items: [ {text: "计算 GitHub 事件得分总和", link: "/collections/examples/format-github-events-score"}, - {text: "格式化计算两个数组的数据", link: "/collections/examples/format-calculate-the-data-of-the-two-arrays"}, + { + text: "格式化计算两个数组的数据", + link: "/collections/examples/format-calculate-the-data-of-the-two-arrays" + }, {text: "通过值获取对应key", link: "/collections/examples/get-the-corresponding-key-by-value"}, {text: "map 格式化数据", link: "/collections/examples/map-format"}, {text: "格式化 Markdown 数据列表", link: "/collections/examples/markdown-format"}, @@ -186,17 +189,27 @@ export default { ], '/packages/': [ { - text: '', + text: 'Laravel', + items: [ + {text: "Pail", link: "/packages/laravel/pail"}, + {text: "Pint", link: "/packages/laravel/pint"}, + ] + }, + { + text: 'Spatie', items: [ - {text: "Laravel Pail", link: "/packages/pail"}, - {text: "Laravel Pint", link: "/packages/pint"}, - {text: "Laravel Login Link", link: "/packages/laravel-login-link"}, - {text: "Sushi 🍣", link: "/packages/sushi"}, - {text: "Livewire Missing Assertions", link: "/packages/missing-livewire-assertions"}, - {text: "Laravel Backup", link: "/packages/backup"}, - {text: "Laravel Data", link: "/packages/laravel-data"}, + {text: "Login Link", link: "/packages/spatie/laravel-login-link"}, + {text: "Backup", link: "/packages/spatie/laravel-backup"}, + {text: "Data", link: "/packages/spatie/laravel-data"}, + ] + }, + { + text: 'Others', + items: [ + {text: "Sushi 🍣", link: "/packages/others/sushi"}, + {text: "Livewire Missing Assertions", link: "/packages/others/missing-livewire-assertions"}, ], - } + }, ], '/partials/': [ { @@ -220,7 +233,10 @@ export default { {text: "DB 模型和 Eloquent", link: "/tips/db-models-and-eloquent"}, {text: "优化 Factory 数据库批量插入", link: '/tips/optimize-factory-database-batch-insert'}, {text: "重用环境变量值", link: '/tips/reuse-the-environment-variable-value'}, - {text: "使用 Laravel simple-excel 处理大型 CSV 文件", link: '/tips/process-large-csv-files-with-laravel-using-simple-excel'}, + { + text: "使用 Laravel simple-excel 处理大型 CSV 文件", + link: '/tips/process-large-csv-files-with-laravel-using-simple-excel' + }, ] } ], @@ -232,7 +248,10 @@ export default { {text: "自定义异常", link: "/others/using-custom-exceptions-to-write-better-and-clearer-code"}, {text: "使用 pest 测试 Laravel API", link: "/others/unit-test-laravel-api-pest-framework.md"}, {text: "自定义逻辑 Macros", link: "/others/macros.md"}, - {text: '使用 Alpine.js 滚动到验证错误', link: "/others/scroll-to-validation-error-in-laravel-using-alpinejs"}, + { + text: '使用 Alpine.js 滚动到验证错误', + link: "/others/scroll-to-validation-error-in-laravel-using-alpinejs" + }, {text: '生成视图的 Artisan 命令', link: "/others/artisan-command-to-generate-views-in-laravel"}, ], }, diff --git a/docs/packages/README.md b/docs/packages/README.md index 9ec79076f..f19760cbd 100644 --- a/docs/packages/README.md +++ b/docs/packages/README.md @@ -1,8 +1,14 @@ # Laravel 扩展 -- [Laravel Pail 日志](pail.md) -- [Laravel pint 代码格式化](pint.md) -- [Laravel Login Link 快速登录](laravel-login-link.md) -- [Livewire 缺少的测试断言](missing-livewire-assertions.md) -- [Laravel Backup 数据备份](backup.md) -- [Laravel Data 数据对象](laravel-data.md) \ No newline at end of file +- [Laravel](laravel/README.md) + - [Laravel Pail 日志](laravel/pail.md) + - [Laravel pint 代码格式化](laravel/pint.md) + +- [Spatie](spatie/README.md) + - [Laravel Login Link 快速登录](spatie/laravel-login-link.md) + - [Laravel Backup 数据备份](spatie/laravel-backup.md) + - [Laravel Data 数据对象](spatie/laravel-data.md) + +- [Others](others/README.md) + - [Livewire 缺少的测试断言](others/missing-livewire-assertions.md) + - [Sushi](others/sushi.md) diff --git a/docs/packages/laravel/README.md b/docs/packages/laravel/README.md new file mode 100644 index 000000000..110c3e0a5 --- /dev/null +++ b/docs/packages/laravel/README.md @@ -0,0 +1,4 @@ +# Laravel + +- [Laravel Pail 日志](pail.md) +- [Laravel pint 代码格式化](pint.md) \ No newline at end of file diff --git a/docs/packages/images/pail-logs.png b/docs/packages/laravel/images/pail-logs.png similarity index 100% rename from docs/packages/images/pail-logs.png rename to docs/packages/laravel/images/pail-logs.png diff --git a/docs/packages/laravel/index.md b/docs/packages/laravel/index.md new file mode 100644 index 000000000..4beb4afca --- /dev/null +++ b/docs/packages/laravel/index.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/packages/pail.md b/docs/packages/laravel/pail.md similarity index 97% rename from docs/packages/pail.md rename to docs/packages/laravel/pail.md index 499d894d9..b809d6b9d 100644 --- a/docs/packages/pail.md +++ b/docs/packages/laravel/pail.md @@ -21,7 +21,7 @@ composer require laravel/pail php artisan pail ``` -![](./images/pail-logs.png) +![](images/pail-logs.png) 上面是基本的使用方式,同时 Laravel Pail 有一些标志允许以有用的方式过滤日志消息。 diff --git a/docs/packages/pint.md b/docs/packages/laravel/pint.md similarity index 100% rename from docs/packages/pint.md rename to docs/packages/laravel/pint.md diff --git a/docs/packages/others/README.md b/docs/packages/others/README.md new file mode 100644 index 000000000..0293dfc11 --- /dev/null +++ b/docs/packages/others/README.md @@ -0,0 +1,4 @@ +# Spatie + +- [Livewire 缺少的测试断言](missing-livewire-assertions.md) +- [Sushi](sushi.md) diff --git a/docs/packages/others/index.md b/docs/packages/others/index.md new file mode 100644 index 000000000..4beb4afca --- /dev/null +++ b/docs/packages/others/index.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/packages/missing-livewire-assertions.md b/docs/packages/others/missing-livewire-assertions.md similarity index 100% rename from docs/packages/missing-livewire-assertions.md rename to docs/packages/others/missing-livewire-assertions.md diff --git a/docs/packages/sushi.md b/docs/packages/others/sushi.md similarity index 100% rename from docs/packages/sushi.md rename to docs/packages/others/sushi.md diff --git a/docs/packages/spatie/README.md b/docs/packages/spatie/README.md new file mode 100644 index 000000000..fa16a793c --- /dev/null +++ b/docs/packages/spatie/README.md @@ -0,0 +1,5 @@ +# Spatie + +- [Laravel Login Link 快速登录](laravel-login-link.md) +- [Laravel Backup 数据备份](laravel-backup.md) +- [Laravel Data 数据对象](laravel-data.md) \ No newline at end of file diff --git a/docs/packages/spatie/index.md b/docs/packages/spatie/index.md new file mode 100644 index 000000000..4beb4afca --- /dev/null +++ b/docs/packages/spatie/index.md @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/docs/packages/backup.md b/docs/packages/spatie/laravel-backup.md similarity index 100% rename from docs/packages/backup.md rename to docs/packages/spatie/laravel-backup.md diff --git a/docs/packages/laravel-data.md b/docs/packages/spatie/laravel-data.md similarity index 100% rename from docs/packages/laravel-data.md rename to docs/packages/spatie/laravel-data.md diff --git a/docs/packages/laravel-login-link.md b/docs/packages/spatie/laravel-login-link.md similarity index 100% rename from docs/packages/laravel-login-link.md rename to docs/packages/spatie/laravel-login-link.md