我们在 laravel 中使用 mpociot/Laravel-apidoc-generator 生成 api文档的时候,会有这么一个展示页面
在页面的左上角有个logo,默认是这个样子的,那么如何修改这个logo呢,换成我们自己的logo;
配置方法:
在项目目录中找到 apidoc.php 这个文件就是用来配置相关信息的;
我这里测试用的 laravel 6 版本项目,位置在: /config/apidoc.php
如果不在这里的话,可以在项目目录中全局搜索一下 apidoc.php 这个文件
打开这个文件,我们找到下面的代码:
/*
* Custom logo path. The logo will be copied from this location
* during the generate process. Set this to false to use the default logo.
*
* Change to an absolute path to use your custom logo. For example:
* 'logo' => resource_path('views') . '/api/logo.png'
*
* If you want to use this, please be aware of the following rules:
* - the image size must be