如何使用laravel在供应商文件夹下显示资产文件?

时间:2018-10-15 07:59:25

标签: laravel swagger assets

使用l5-swagger生成张扬的文档。运行以下命令后:

$ php artisan l5-swagger:publish
Publishing all files
Copied Directory [/vendor/darkaonline/l5-swagger/resources/views] To [/resources/views/vendor/l5-swagger]
Copied Directory [/vendor/darkaonline/l5-swagger/resources/assets] To [/public/vendor/l5-swagger]
Publishing complete.
$ php artisan l5-swagger:generate
Regenerating docs
$ php artisan vendor:publish --provider 'L5Swagger\L5SwaggerServiceProvider'
Copied Directory [/vendor/darkaonline/l5-swagger/resources/views] To [/resources/views/vendor/l5-swagger]
Copied Directory [/vendor/darkaonline/l5-swagger/resources/assets] To [/public/vendor/l5-swagger]
Publishing complete.

似乎它已将资产文件从供应商复制到公用文件夹。但是,当从浏览器检查页面时,获得了以下来源:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>Swagger UI</title>
    <link rel="icon" type="image/png" href="/vendor/l5-swagger/images/favicon-32x32.png" sizes="32x32" />
    <link rel="icon" type="image/png" href="/vendor/l5-swagger/images/favicon-16x16.png" sizes="16x16" />
    <link href='/vendor/l5-swagger/css/typography.css' media='screen' rel='stylesheet' type='text/css'/>
    <link href='/vendor/l5-swagger/css/reset.css' media='screen' rel='stylesheet' type='text/css'/>
    <link href='/vendor/l5-swagger/css/screen.css' media='screen' rel='stylesheet' type='text/css'/>
    <link href='/vendor/l5-swagger/css/reset.css' media='print' rel='stylesheet' type='text/css'/>
    <link href='/vendor/l5-swagger/css/print.css' media='print' rel='stylesheet' type='text/css'/>
    <script src='/vendor/l5-swagger/lib/object-assign-pollyfill.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/jquery-1.8.0.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/jquery.slideto.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/jquery.wiggle.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/jquery.ba-bbq.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/handlebars-2.0.0.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/lodash.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/backbone-min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/swagger-ui.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/highlight.9.1.0.pack.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/jsoneditor.min.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/marked.js' type='text/javascript'></script>
    <script src='/vendor/l5-swagger/lib/swagger-oauth.js' type='text/javascript'></script>
...

在我的本地工作站上,它运行良好。但是在另一台服务器上,无法访问/vendor文件夹下的文件。如何显示样式?

0 个答案:

没有答案