Docs reader for laravel, currently supported extensions is: .md
Helpful to use it as knowledge base
or faq
of your project or features.
- Render
.md
docs - Security: Configure access
- You can request/suggest more features
-
Install:
-
git
:git clone https://github.com/AnandPilania/laravel-docs.git
-
composer
:composer install anandpilania/laravel-docs
-
Register
Provider
toconfig/app.php
: -
AP\Docs\ServiceProvider::class
Instead of
Facade
, I usedContract
, soDocs
can be directly accessible to anyclass
. -
-
Publish the
config
andresources
:php artisan vendor:publish
-
Configure package according to your need (
app/docs.php
):disk.root
=> Root path of all documents (by default: storage/app/docs)
http
: Responsible for default routesprefix
=> Route prefix (default: /docs)middleware
=> By default,web
is used as a middleware group
default' : This section responsible for rendering the default
doc`vendor
=> Default: storage/app/docs/laravelversion
=> Default: 5.4page
=> Load default (installation) file while accessing //HOSTNAME/docs/laravel/5.4.index
=> Defaultindex
fileextension
=> Currently this package supports only.md
, so don't change it.
security
: Limit the access ofdocs
enabled
=> Its up to you, to enable this feature or not.true
||false
file
=> Configure the file name ofsecurity
according to your wish. defaultsecurity.json
Add thissecurity.file
to thevendor
directory.
extensions
:supported
=> Add extensions those are supported for render (currently.md
), remaning extensions will excludedexcluded
=> Files containing these extensions will not displayed in the list
-
Sample
security.json
(ex: /storage/docs/app/laravel/security.json):{ "roles": ["users"], "permissions": ["docs.show.versions"] }