File tree Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Expand file tree Collapse file tree 2 files changed +20
-0
lines changed Original file line number Diff line number Diff line change 8787 ],
8888 ],
8989 ],
90+
91+ /**
92+ * Custom logo path. Will be copied during generate command.
93+ *
94+ * If you want to use this, please be aware of the following rules:
95+ * - filename: logo.png
96+ * - size: 230 x 52
97+ *
98+ * Change false to an absolute path. For example:
99+ * 'logo' => resource_path('views') . '/api/logo.png'
100+ */
101+ 'logo ' => false
90102];
Original file line number Diff line number Diff line change 77use Illuminate \Console \Command ;
88use Mpociot \Reflection \DocBlock ;
99use Illuminate \Support \Collection ;
10+ use Illuminate \Support \Facades \Storage ;
1011use Mpociot \ApiDoc \Tools \RouteMatcher ;
1112use Mpociot \Documentarian \Documentarian ;
1213use Mpociot \ApiDoc \Postman \CollectionWriter ;
@@ -172,6 +173,13 @@ private function writeMarkdown($parsedRoutes)
172173
173174 file_put_contents ($ outputPath .DIRECTORY_SEPARATOR .'collection.json ' , $ this ->generatePostmanCollection ($ parsedRoutes ));
174175 }
176+
177+ if ($ logo = config ('apidoc.logo ' )) {
178+ Storage::copy (
179+ $ logo ,
180+ $ outputPath .DIRECTORY_SEPARATOR .'images ' .DIRECTORY_SEPARATOR .'logo.png '
181+ );
182+ }
175183 }
176184
177185 /**
You can’t perform that action at this time.
0 commit comments