composer require binarytorch/larecipe
php artisan larecipe:install
然后通过yourdomain.test/docs
访问或者通过http://127.0.0.1:8000/docs
本地访问。
安装 LaRecipe 后,配置文件位于config/larecipe.php. 在此文件中,你可以找到用于更改 LaRecipe 安装配置的各种选项。
比如陆页面用于在用户访问您的文档根路由而不指定页面时将其重定向到该页面,默认情况下假定为overview.md.
return [
'docs' => [
'route' => '/docs',
'path' => '/resources/docs',
'landing' => 'overview',
'middleware' => ['web']
]
];
设置版本,指定用户可以查看的文档的已发布版本
return [
'versions' => [
'default' => '1.0',
'published' => [
'1.0'
]
]
];
设置缓存
return [
'cache' => [
'enabled' => false,
'period' => 5
]
];
LaRecipe 在 Laravel 应用程序的后端呈现文档,因此利用自定义 VueJs 组件非常酷。
LaRecipe 提供了一堆令人惊叹的基于 UI Vue 的组件。
<larecipe-card shadow>
Example card
</larecipe-card>
<larecipe-button radius="full">Example button</larecipe-button>
<larecipe-button type="success" radius="full">Success button</larecipe-button>
还有更多特性功能大家自行探索噢~
Github地址:https://github.com/saleem-hadad/larecipe
LaRecipe 包内部使用了一些开源的第三方库/包
End