File tree Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Expand file tree Collapse file tree 2 files changed +19
-0
lines changed Original file line number Diff line number Diff line change 143143 ],
144144 ],
145145 ],
146+
147+ /*
148+ * Custom logo path. Will be copied during generate command. Set this to false to use the default logo.
149+ *
150+ * Change to an absolute path to use your custom logo. For example:
151+ * 'logo' => resource_path('views') . '/api/logo.png'
152+ *
153+ * If you want to use this, please be aware of the following rules:
154+ * - size: 230 x 52
155+ */
156+ 'logo ' => false ,
146157];
Original file line number Diff line number Diff line change 88use Mpociot \Reflection \DocBlock ;
99use Illuminate \Support \Collection ;
1010use Mpociot \ApiDoc \Tools \RouteMatcher ;
11+ use Illuminate \Support \Facades \Storage ;
1112use Mpociot \ApiDoc \Generators \Generator ;
1213use Mpociot \Documentarian \Documentarian ;
1314use Mpociot \ApiDoc \Postman \CollectionWriter ;
@@ -169,6 +170,13 @@ private function writeMarkdown($parsedRoutes)
169170
170171 file_put_contents ($ outputPath .DIRECTORY_SEPARATOR .'collection.json ' , $ this ->generatePostmanCollection ($ parsedRoutes ));
171172 }
173+
174+ if ($ logo = config ('apidoc.logo ' )) {
175+ Storage::copy (
176+ $ logo ,
177+ $ outputPath .DIRECTORY_SEPARATOR .'images ' .DIRECTORY_SEPARATOR .'logo.png '
178+ );
179+ }
172180 }
173181
174182 /**
You can’t perform that action at this time.
0 commit comments